The following commands are supported: * ai api-key list * ai api-key create * ai api-key api-key-id show * ai api-key api-key-id destroy To get the golden files spec passing, add ApiKey.random_key, so it can be overridden to provide a consistent key for the specs.
13 lines
318 B
Ruby
13 lines
318 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../../spec_helper"
|
|
|
|
RSpec.describe Clover, "cli ai api-key destroy" do
|
|
it "destroys api key" do
|
|
cli(%w[ai api-key create])
|
|
iak = ApiKey.first(owner_table: "project")
|
|
cli(%W[ai api-key #{iak.ubid} destroy -f])
|
|
expect(iak.exists?).to be false
|
|
end
|
|
end
|