forked from External/greenlight
GRN2-xx: Fixed issue with room join (#779)
* Fixed issue with room join * Rspec fix
This commit is contained in:
committed by
Jesus Federico
parent
201a394813
commit
061b69f962
@ -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
|
||||
|
Reference in New Issue
Block a user