Sha256: 7f0fe2b9c9093a63adb9b19fd86a7534bf64a9c559c4314e1fb15354fe5def44
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
require 'test_helper' describe Clever::NestedResource, :vcr do before do Clever.configure do |config| config.token = 'DEMO_TOKEN' end end [Clever::District, Clever::School, Clever::Student, Clever::Event, Clever::Section, Clever::Teacher, Clever::SchoolAdmin, Clever::DistrictAdmin].each do |resource| next if resource.linked_resources.nil? resource.linked_resources.each do |link| it "retrieves a #{resource.shortname}'s #{link}" do result = resource.find.first.send link if Clever::APIResource.singular?(link.to_s) result.must_be_instance_of Clever::APIResource.named(link.to_s) else result.must_be_instance_of Clever::NestedResource result.size.must_equal result.count # check count request measures actual data size end end end end it 'must include auth_token in linked_resources' do school = Clever::District.find.first.send(:schools).first school.auth_token.must_equal 'DEMO_TOKEN' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clever-ruby-0.14.0 | test/integration/nested_resource_test.rb |