1 require "application_system_test_case"
3 class MessagesTest < ApplicationSystemTestCase
4 def test_delete_received_message
6 create(:message, :recipient => user)
9 visit inbox_messages_path
10 assert_text "You have 1 new message and 0 old messages"
13 assert_text "You have 0 new messages and 0 old messages"
16 def test_delete_sent_message
18 create(:message, :sender => user)
21 visit outbox_messages_path
22 assert_text "You have 1 sent message"
25 assert_text "You have 0 sent messages"
28 def test_delete_muted_message
30 muted_user = create(:user)
31 create(:user_mute, :owner => user, :subject => muted_user)
32 create(:message, :sender => muted_user, :recipient => user)
35 visit muted_messages_path
36 assert_text "1 muted message"
39 assert_text "0 muted messages"