mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-04-30 07:54:27 +09:00
28 lines
594 B
Ruby
28 lines
594 B
Ruby
require "application_system_test_case"
|
|
|
|
class UnreadRoomsTest < ApplicationSystemTestCase
|
|
setup do
|
|
sign_in "jz@37signals.com"
|
|
end
|
|
|
|
test "sending messages between two users" do
|
|
designers_room = rooms(:designers)
|
|
hq_room = rooms(:hq)
|
|
|
|
join_room hq_room
|
|
assert_room_read hq_room
|
|
|
|
using_session("Kevin") do
|
|
sign_in "kevin@37signals.com"
|
|
join_room designers_room
|
|
send_message("Hello!!")
|
|
send_message("Talking to myself?")
|
|
end
|
|
|
|
assert_room_unread designers_room
|
|
|
|
join_room designers_room
|
|
assert_room_read designers_room
|
|
end
|
|
end
|