GRN2-118: Create a setting to require authentication to join a room (#541)

* Create a setting to require authentication to join a room

* Apply comments
This commit is contained in:
shawn-higgins1
2019-05-22 13:44:40 -04:00
committed by Jesus Federico
parent 996518eea7
commit 70acb9a7e1
11 changed files with 89 additions and 14 deletions

View File

@ -206,6 +206,14 @@ describe RoomsController, type: :controller do
expect(flash[:alert]).to be_present
expect(response).to redirect_to(root_path)
end
it "should not allow the user to join if the user isn't signed in and room authentication is required" do
allow_any_instance_of(Setting).to receive(:get_value).and_return("true")
post :join, params: { room_uid: @room }
expect(response).to redirect_to(signin_path)
end
end
describe "DELETE #destroy" do