GRN2-xx: Fixed issue with room join (#779)

* Fixed issue with room join

* Rspec fix
This commit is contained in:
Ahmad Farhat
2019-09-05 15:50:19 -04:00
committed by Jesus Federico
parent 201a394813
commit 061b69f962
3 changed files with 21 additions and 0 deletions

View File

@ -121,6 +121,20 @@ describe RoomsController, type: :controller do
expect(response).to redirect_to(admins_path)
end
it "redirects to root if the providers dont match" do
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
allow_any_instance_of(Room).to receive(:running?).and_return(false)
@owner.update_attribute(:provider, "provider1")
@user.update_attribute(:provider, "provider2")
@request.session[:user_id] = @user.id
get :show, params: { room_uid: @owner.main_room }
expect(flash[:alert]).to be_present
expect(response).to redirect_to(root_path)
end
end
describe "POST #create" do