From e11f82f7d2feebadf27008c79ef74b792982f5b3 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 1 Dec 2014 13:18:08 +0100 Subject: [PATCH] Fixed test helper. --- test/unit/session_collections_test.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/unit/session_collections_test.rb b/test/unit/session_collections_test.rb index e4ab037f5..219d6fef2 100644 --- a/test/unit/session_collections_test.rb +++ b/test/unit/session_collections_test.rb @@ -143,21 +143,17 @@ class SessionCollectionsTest < ActiveSupport::TestCase if result[:collection] && result[:collection][collection] # check just if collection exists - if !attributes - return true - end + return true if !attributes # check if objetc with attributes in collection exists result[:collection][collection].each {|item| match_all = true attributes.each {|key, value| - if item.attributes_with_associations[ key.to_s ] != value + if item[ key.to_s ] != value match_all = false end } - if match_all - return true - end + return true if match_all } end }