aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'test/nodes')
-rw-r--r--test/nodes/test_bind_param.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/nodes/test_bind_param.rb b/test/nodes/test_bind_param.rb
index 011de6410c..482bb24f33 100644
--- a/test/nodes/test_bind_param.rb
+++ b/test/nodes/test_bind_param.rb
@@ -4,12 +4,17 @@ require 'helper'
module Arel
module Nodes
describe 'BindParam' do
- it 'is equal to other bind params' do
- BindParam.new.must_equal(BindParam.new)
+ it 'is equal to other bind params with the same value' do
+ BindParam.new(1).must_equal(BindParam.new(1))
+ BindParam.new("foo").must_equal(BindParam.new("foo"))
end
it 'is not equal to other nodes' do
- BindParam.new.wont_equal(Node.new)
+ BindParam.new(nil).wont_equal(Node.new)
+ end
+
+ it 'is not equal to bind params with different values' do
+ BindParam.new(1).wont_equal(BindParam.new(2))
end
end
end