spec/support/initialized_client.rb in mrkt-1.2.0 vs spec/support/initialized_client.rb in mrkt-1.2.1
- old
+ new
@@ -1,16 +1,16 @@
require 'securerandom'
require 'json'
-shared_context 'initialized client' do
+shared_context 'with an initialized client' do
+ subject(:client) { Mrkt::Client.new(host: host, client_id: client_id, client_secret: client_secret) }
+
let(:host) { '0-KBZ-0.mktorest.com' }
let(:client_id) { SecureRandom.uuid }
let(:client_secret) { SecureRandom.hex }
let(:authentication_stub) do
{ access_token: SecureRandom.uuid, token_type: 'bearer', expires_in: 2241, scope: 'RestClient' }
end
-
- subject(:client) { Mrkt::Client.new(host: host, client_id: client_id, client_secret: client_secret) }
before do
@authentication_request_stub = stub_request(:get, "https://#{host}/identity/oauth/token")
.with(query: { client_id: client_id, client_secret: client_secret, grant_type: 'client_credentials' })
.to_return(json_stub(authentication_stub))