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.
12 lines
312 B
Ruby
12 lines
312 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../../spec_helper"
|
|
|
|
RSpec.describe Clover, "cli ai api-key create" do
|
|
it "creates api key" do
|
|
expect(ApiKey.where(owner_table: "project").count).to eq 0
|
|
cli(%w[ai api-key create])
|
|
expect(ApiKey.where(owner_table: "project").count).to eq 1
|
|
end
|
|
end
|