forked from External/greenlight
Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl> (#1296)
Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
This commit is contained in:
@ -185,7 +185,7 @@ describe RoomsController, type: :controller do
|
||||
room_params = { name: name, "mute_on_join": "1",
|
||||
"require_moderator_approval": "1", "anyone_can_start": "1", "all_join_moderator": "1" }
|
||||
json_room_settings = "{\"muteOnStart\":true,\"requireModeratorApproval\":true," \
|
||||
"\"anyoneCanStart\":true,\"joinModerator\":true}"
|
||||
"\"anyoneCanStart\":true,\"joinModerator\":true,\"recording\":false}"
|
||||
|
||||
post :create, params: { room: room_params }
|
||||
|
||||
@ -202,12 +202,12 @@ describe RoomsController, type: :controller do
|
||||
@owner.main_room.update_attribute(:room_settings, { "muteOnStart": true, "requireModeratorApproval": true,
|
||||
"anyoneCanStart": true, "joinModerator": true }.to_json)
|
||||
|
||||
json_room_settings = "{\"muteOnStart\":true,\"requireModeratorApproval\":true," \
|
||||
json_room_settings = "{\"running\":false,\"muteOnStart\":true,\"requireModeratorApproval\":true," \
|
||||
"\"anyoneCanStart\":true,\"joinModerator\":true}"
|
||||
|
||||
get :room_settings, params: { room_uid: @owner.main_room }, format: :json
|
||||
|
||||
expect(JSON.parse(response.body)).to eql(json_room_settings)
|
||||
expect(JSON.parse(response.body).to_json).to eql(json_room_settings)
|
||||
end
|
||||
|
||||
it "should redirect to root if not logged in" do
|
||||
@ -583,9 +583,9 @@ describe RoomsController, type: :controller do
|
||||
it "properly updates room settings through the room settings modal and redirects to current page" do
|
||||
@request.session[:user_id] = @user.id
|
||||
|
||||
room_params = { "mute_on_join": "1", "name": @secondary_room.name }
|
||||
room_params = { "mute_on_join": "1", "name": @secondary_room.name, "recording": "1" }
|
||||
formatted_room_params = "{\"muteOnStart\":true,\"requireModeratorApproval\":false," \
|
||||
"\"anyoneCanStart\":false,\"joinModerator\":false}" # JSON string format
|
||||
"\"anyoneCanStart\":false,\"joinModerator\":false,\"recording\":true}" # JSON string format
|
||||
|
||||
expect { post :update_settings, params: { room_uid: @secondary_room.uid, room: room_params } }
|
||||
.to change { @secondary_room.reload.room_settings }
|
||||
@ -608,7 +608,7 @@ describe RoomsController, type: :controller do
|
||||
|
||||
room_params = { "mute_on_join": "1", "name": @secondary_room.name }
|
||||
formatted_room_params = "{\"muteOnStart\":true,\"requireModeratorApproval\":false," \
|
||||
"\"anyoneCanStart\":false,\"joinModerator\":false}" # JSON string format
|
||||
"\"anyoneCanStart\":false,\"joinModerator\":false,\"recording\":false}" # JSON string format
|
||||
|
||||
expect { post :update_settings, params: { room_uid: @secondary_room.uid, room: room_params } }
|
||||
.to change { @secondary_room.reload.room_settings }
|
||||
|
Reference in New Issue
Block a user