Files
ubicloud/spec/routes/api/cli/ai/api-key/create_spec.rb
Jeremy Evans 045837597c Add cli ai api-key commands
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.
2025-05-03 03:33:32 +09:00

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