diff --git a/spec/integration/users_spec.rb b/spec/integration/users_spec.rb index 0716522..da3857c 100644 --- a/spec/integration/users_spec.rb +++ b/spec/integration/users_spec.rb @@ -29,19 +29,11 @@ ROLES.should include relationship.role end end - + it 'gets the investors that are tagged with the given tag' do investors = client.user_tags(tag_id, :investor => 'by_residence') - - # Get the first investor user profile - user = client.get_user(investors.users[0].id) - - # Check his locations tags - location_match = false - user.locations.each do |location| - location_match = true if location.id == tag_id - end - location_match.should == true + user = client.get_user(investors.users.first.id) + user.locations.any? { |loc| loc.id == tag_id }.should be true end end