Fix ip addr search tests.

This commit is contained in:
evazion
2017-01-12 07:43:59 +00:00
parent 26c193dfb3
commit cf046eecbf
2 changed files with 4 additions and 4 deletions

View File

@@ -19,17 +19,17 @@ module Moderator
should "find by ip addr" do
@search = IpAddrSearch.new(:ip_addr => "127.0.0.1")
assert_equal({@user.id.to_s => 2}, @search.execute)
assert_equal({@user => 2}, @search.execute)
end
should "find by user id" do
@search = IpAddrSearch.new(:user_id => @user.id.to_s)
assert_equal({"127.0.0.1" => 2}, @search.execute)
assert_equal({IPAddr.new("127.0.0.1") => 2}, @search.execute)
end
should "find by user name" do
@search = IpAddrSearch.new(:user_name => @user.name)
assert_equal({"127.0.0.1" => 2}, @search.execute)
assert_equal({IPAddr.new("127.0.0.1") => 2}, @search.execute)
end
end
end