spec/rest/base_client_spec.rb in finapps-2.0.10 vs spec/rest/base_client_spec.rb in finapps-2.0.11
- old
+ new
@@ -14,9 +14,19 @@
it 'assigns @config' do
expect(subject.config).to be_a(FinApps::REST::Configuration)
end
end
+ describe '#user_credentials?' do
+ context 'when user credentials were not set' do
+ it { expect(subject.user_credentials?).to eq(false) }
+ end
+ context 'when user credentials were set' do
+ subject { FinApps::REST::BaseClient.new(valid_tenant_options.merge(user_identifier: 1, user_token: 2)) }
+ it { expect(subject.user_credentials?).to eq(true) }
+ end
+ end
+
describe '#connection' do
it 'created a Faraday connection object' do
expect(subject.connection).to be_a(Faraday::Connection)
end