diff options
author | Rasik Pandey <rbpandey@gmail.com> | 2009-01-28 19:39:06 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-01-28 19:39:06 +0000 |
commit | 6079ec1f77daf364a2b25cf651e9b3c9e1b95a16 (patch) | |
tree | 229921115599ceaf9fe33e17228ee2541f18970a /activeresource/test/base | |
parent | 9a8e2a059c823498e0fb318f25b926a6d015ef87 (diff) | |
download | rails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.tar.gz rails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.tar.bz2 rails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.zip |
ActiveResource#eqls? and == should not take into account object identity and prefix options should be considered. [#1098 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activeresource/test/base')
-rw-r--r-- | activeresource/test/base/equality_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activeresource/test/base/equality_test.rb b/activeresource/test/base/equality_test.rb index 1fb8938e95..84f1a7b998 100644 --- a/activeresource/test/base/equality_test.rb +++ b/activeresource/test/base/equality_test.rb @@ -40,4 +40,13 @@ class BaseEqualityTest < Test::Unit::TestCase assert_equal resource.id.hash, resource.hash end end + + def test_with_prefix_options + assert_equal @one == @one, @one.eql?(@one) + assert_equal @one == @one.dup, @one.eql?(@one.dup) + new_one = @one.dup + new_one.prefix_options = {:foo => 'bar'} + assert_not_equal @one, new_one + end + end |