mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-03-13 13:45:16 +09:00
15 lines
453 B
Ruby
15 lines
453 B
Ruby
require "test_helper"
|
|
|
|
class Rooms::OpenTest < ActiveSupport::TestCase
|
|
test "grants access to all users after creation" do
|
|
room = Rooms::Open.create!(name: "My open room with everyone!", creator: users(:david))
|
|
assert_equal User.count, room.users.count
|
|
end
|
|
|
|
test "grants access to all users after becoming open" do
|
|
room = rooms(:watercooler).becomes!(Rooms::Open)
|
|
room.save!
|
|
assert_equal User.count, room.users.count
|
|
end
|
|
end
|