forked from External/greenlight
GRN2-180: First stages of refactoring code for v2.4 (#748)
* Email rescues and authenticator concern * Application controller and helper clean up * Moved controller code out of helpers * More helper and email clean up * Cleaned up remaining helpers and create omniauth_options * Controller code clean up * restructured views structure * Restructured role code * Restructured profile and code clean up * Master merge * Added bbb server concern to deal with bbb calls * Bug fixes and changes after changes * rspec * More rubocop fixes
This commit is contained in:
@ -27,10 +27,10 @@ describe RecordingsController, type: :controller do
|
||||
|
||||
context "POST #update_recording" do
|
||||
it "updates the recordings details" do
|
||||
allow_any_instance_of(Room).to receive(:update_recording).and_return(updated: true)
|
||||
allow_any_instance_of(BbbServer).to receive(:update_recording).and_return(updated: true)
|
||||
@request.session[:user_id] = @user.uid
|
||||
|
||||
post :update_recording, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
post :update, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
|
||||
expect(response).to have_http_status(302)
|
||||
end
|
||||
@ -38,7 +38,7 @@ describe RecordingsController, type: :controller do
|
||||
it "redirects to root if not the room owner" do
|
||||
@request.session[:user_id] = @secondary_user.uid
|
||||
|
||||
post :update_recording, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
post :update, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
@ -46,10 +46,10 @@ describe RecordingsController, type: :controller do
|
||||
|
||||
context "DELETE #delete_recording" do
|
||||
it "deletes the recording" do
|
||||
allow_any_instance_of(Room).to receive(:delete_recording).and_return(true)
|
||||
allow_any_instance_of(BbbServer).to receive(:delete_recording).and_return(true)
|
||||
@request.session[:user_id] = @user.uid
|
||||
|
||||
post :delete_recording, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
post :delete, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
|
||||
expect(response).to have_http_status(302)
|
||||
end
|
||||
@ -57,7 +57,7 @@ describe RecordingsController, type: :controller do
|
||||
it "redirects to root if not the room owner" do
|
||||
@request.session[:user_id] = @secondary_user.uid
|
||||
|
||||
post :delete_recording, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
post :delete, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, state: "public" }
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
|
Reference in New Issue
Block a user