spec/rest/client_spec.rb in finapps-2.0.20 vs spec/rest/client_spec.rb in finapps-2.0.21

- old
+ new

@@ -11,11 +11,11 @@ end context 'an instance of Client' do subject { FinApps::REST::Client.new(:company_identifier, :company_token) } - %i(users sessions orders order_tokens).each do |method| + %i(users sessions orders order_tokens institutions institutions_forms user_institutions_statuses user_institutions user_institutions_forms).each do |method| it "responds to #{method}" do expect(subject).to respond_to(method) end end @@ -33,13 +33,33 @@ describe '#orders' do it { expect(subject.orders).to be_an_instance_of(FinApps::REST::Orders) } end + describe '#institutions' do + it { expect(subject.institutions).to be_an_instance_of(FinApps::REST::Institutions) } + end + + describe '#institutions_forms' do + it { expect(subject.institutions_forms).to be_an_instance_of(FinApps::REST::InstitutionsForms) } + end + + describe '#user_institutions_statuses' do + it { expect(subject.user_institutions_statuses).to be_an_instance_of(FinApps::REST::UserInstitutionsStatuses) } + end + + describe '#user_institutions' do + it { expect(subject.user_institutions).to be_an_instance_of(FinApps::REST::UserInstitutions) } + end + + describe '#user_institutions_forms' do + it { expect(subject.user_institutions_forms).to be_an_instance_of(FinApps::REST::UserInstitutionsForms) } + end + # [:users, :institutions, :user_institutions, :transactions, :categories, # :budget_models, :budget_calculation, :budgets, :cashflows, # :alert, :alert_definition, :alert_preferences, :alert_settings, :rule_sets] - %i(users sessions orders order_tokens).each do |method| + %i(users sessions orders order_tokens institutions institutions_forms user_institutions_statuses user_institutions user_institutions_forms).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