Skip to content

Commit

Permalink
fix broken unit tests
Browse files Browse the repository at this point in the history
Fix test for Ruby 1.9 / MiniTest.
  • Loading branch information
Lennart Koopmann committed Dec 10, 2010
1 parent 3569055 commit d27c09e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/functional/sessions_controller_test.rb
Expand Up @@ -31,7 +31,7 @@ def test_should_remember_me
def test_should_not_remember_me
@request.cookies["auth_token"] = nil
post :create, :login => 'quentin', :password => 'monkey', :remember_me => "0"
assert @response.cookies["auth_token"].blank?, @response.cookies["auth_token"]
assert @response.cookies["auth_token"].blank?, "Cookie contains #{@response.cookies["auth_token"]}"
end

def test_should_delete_token_on_logout
Expand Down
5 changes: 4 additions & 1 deletion test/unit/hostgroup_test.rb
Expand Up @@ -86,7 +86,9 @@ class HostgroupTest < ActiveSupport::TestCase
assert conditions[0].length > 0
end

should "treat host with no type as hostname" do
test "treat host with no type as hostname" do
Host.make(:host => "host1").save

group = Hostgroup.find(4)
conditions = group.hostname_conditions

Expand All @@ -96,3 +98,4 @@ class HostgroupTest < ActiveSupport::TestCase
assert_equal "host1", conditions[0]
end
end

2 changes: 2 additions & 0 deletions test/unit/message_test.rb
Expand Up @@ -4,6 +4,8 @@ class MessageTest < ActiveSupport::TestCase
should "test all_of_hostgroup"

should "test count_of_hostgroup" do
Host.make(:host => "somehost").save

Message.make(:host => "foobar", :message => "bla").save
Message.make(:host => "foobarish", :message => "gdfgdfhh").save
Message.make(:host => "foofoo", :message => "foobarish").save
Expand Down

0 comments on commit d27c09e

Please sign in to comment.