added ip bans controller

This commit is contained in:
albert
2011-01-14 15:50:17 -05:00
parent 541163685d
commit dceda1b073
8 changed files with 87 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ class IpBanTest < ActiveSupport::TestCase
should "be able to count any updates from a user, groupiny by IP address" do
CurrentUser.scoped(@user, "1.2.3.4") do
comment = Factory.create(:comment, :body => "aaa")
counts = IpBan.search([comment.creator_id])
counts = IpBan.query([comment.creator_id])
assert_equal([{"ip_addr" => "1.2.3.4", "count" => "1"}], counts["comments"])
end
end