Replaced checkbox with dropdown (#552)

This commit is contained in:
farhatahmad
2019-05-23 13:21:43 -04:00
committed by GitHub
parent de1e75fbf8
commit 3e0238eb0c
11 changed files with 72 additions and 61 deletions

View File

@ -285,13 +285,12 @@ describe AdminsController, type: :controller do
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
@request.session[:user_id] = @admin.id
checked = true
post :room_authentication, params: { authenticationRequired: checked }
post :room_authentication, params: { value: "true" }
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Room Authentication")
expect(feature[:value]).to eq(checked.to_s)
expect(feature[:value]).to eq("true")
expect(response).to redirect_to(admins_path)
end
end

View File

@ -212,7 +212,8 @@ describe RoomsController, type: :controller do
post :join, params: { room_uid: @room }
expect(response).to redirect_to(signin_path)
expect(flash[:alert]).to be_present
expect(response).to redirect_to(root_path)
end
end