spec/rest/client_spec.rb in finapps-2.0.4 vs spec/rest/client_spec.rb in finapps-2.0.5
- old
+ new
@@ -10,23 +10,27 @@
end
context 'an instance of Client' do
subject { FinApps::REST::Client.new(:company_identifier, :company_token) }
- %i(users).each do |method|
+ %i(users orders).each do |method|
it "responds to #{method}" do
expect(subject).to respond_to(method)
end
end
describe '#users' do
it { expect(subject.users).to be_an_instance_of(FinApps::REST::Users) }
end
+ describe '#orders' do
+ it { expect(subject.orders).to be_an_instance_of(FinApps::REST::Orders) }
+ end
+
# [:users, :institutions, :user_institutions, :transactions, :categories,
# :budget_models, :budget_calculation, :budgets, :cashflows,
# :alert, :alert_definition, :alert_preferences, :alert_settings, :rule_sets]
- [:users].each do |method|
+ %i(users orders).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