Skip to content

Commit

Permalink
added new test (forgot that one somehow) for message-deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Sep 4, 2008
1 parent 65ee20b commit 769e3fa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/unit/message_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ def test_user_can_read_message
assert(message.is_read, "Message should be read by now!")
end

def test_user_can_delete_message
message = messages(:quentin_to_aaron)
quentin = users(:quentin)
aaron = users(:aaron)
chris = users(:chris)

assert(quentin.can_delete_message?(message), "Quentin could not delete message.")
assert(aaron.can_delete_message?(message), "Aaron could not delete message.")
assert(!chris.can_delete_message?(message), "Chris shouldn't be able to delete message.")
end

def test_message_deletion
message = messages(:aaron_to_quentin)
aaron = users(:aaron)
Expand Down

0 comments on commit 769e3fa

Please sign in to comment.