Acceptance tests for user
This commit is contained in:
@@ -36,7 +36,7 @@ describe List do
|
||||
expect{
|
||||
list.send_table_join_request_for_user! other_user
|
||||
}.to broadcast_to_user(user.id).message('user_join_request').with(
|
||||
hash_including(:users, :join_request)
|
||||
hash_including(:payload)
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -74,14 +74,14 @@ describe List do
|
||||
it "broadcasts the event to the user itself" do
|
||||
joining_user
|
||||
expect{ list.approve_join_request_for_user! joining_user }
|
||||
.to broadcast_to_user(joining_user).message('join_request_approved')
|
||||
.with( hash_including(:user) )
|
||||
.to broadcast_to_user(joining_user).message('join_request_approved')
|
||||
.with( id: "jr-#{joining_user.id}" )
|
||||
end
|
||||
|
||||
it "broadcasts the event to other associated users" do
|
||||
expect{ list.approve_join_request_for_user! joining_user }
|
||||
.to broadcast_to_user(user).message('join_request_approved')
|
||||
.with( hash_including(:user) )
|
||||
.with( id: "jr-#{joining_user.id}" )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user