зеркало из
https://github.com/glebtv/yookassa.git
synced 2026-08-28 15:16:18 +03:00
Adding simplest configurator. No usage of creds right now
Этот коммит содержится в:
9
spec/yookassa/config_spec.rb
Обычный файл
9
spec/yookassa/config_spec.rb
Обычный файл
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Yookassa
|
||||
RSpec.describe Config do
|
||||
subject { described_class.new }
|
||||
it { is_expected.to respond_to(:shop_id) }
|
||||
it { is_expected.to respond_to(:api_key) }
|
||||
end
|
||||
end
|
||||
@@ -4,4 +4,18 @@ RSpec.describe Yookassa do
|
||||
it "has a version number" do
|
||||
expect(Yookassa::VERSION).not_to be nil
|
||||
end
|
||||
|
||||
describe ".configure" do
|
||||
before do
|
||||
Yookassa.configure do |config|
|
||||
config.shop_id = 123
|
||||
config.api_key = "test_321"
|
||||
end
|
||||
end
|
||||
|
||||
it "stores settings and provides access to credentials" do
|
||||
expect(Yookassa.config.shop_id).to eq(123)
|
||||
expect(Yookassa.config.api_key).to eq("test_321")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Ссылка в новой задаче
Block a user