spec/rest/client_spec.rb in finapps-4.0.11 vs spec/rest/client_spec.rb in finapps-4.0.12
- old
+ new
@@ -9,12 +9,16 @@
context 'an instance of Client' do
subject { FinApps::REST::Client.new(:company_token) }
FinApps::REST::Client::RESOURCES.each do |method|
- it "responds to #{method}" do
- expect(subject).to respond_to(method)
+ it("responds to #{method}") { expect(subject).to respond_to(method) }
+
+ it "memoizes the result of #{method}" do
+ first = subject.send(method)
+ second = subject.send(method)
+ expect(first.object_id).to eq(second.object_id)
end
end
describe '#alert_definitions' do
it { expect(subject.alert_definitions).to be_an_instance_of(FinApps::REST::AlertDefinitions) }
@@ -36,10 +40,16 @@
it do
expect(subject.consumer_institution_refreshes).to be_an_instance_of FinApps::REST::ConsumerInstitutionRefreshes
end
end
+ describe '#consumer_institution_refresh' do
+ it do
+ expect(subject.consumer_institution_refresh).to be_an_instance_of FinApps::REST::ConsumerInstitutionRefresh
+ end
+ end
+
describe '#sessions' do
it { expect(subject.sessions).to be_an_instance_of(FinApps::REST::Sessions) }
end
describe '#order_assignments' do
@@ -140,16 +150,8 @@
it { expect(subject.tenant_settings).to be_an_instance_of(FinApps::REST::TenantSettings) }
end
describe '#tenant_app_settings' do
it { expect(subject.tenant_app_settings).to be_an_instance_of(FinApps::REST::TenantAppSettings) }
- end
-
- FinApps::REST::Client::RESOURCES.each do |method|
- it "memoizes the result of #{method}" do
- first = subject.send(method)
- second = subject.send(method)
- expect(first.object_id).to eq(second.object_id)
- end
end
end
end