GRN2-196: Fixed issues that scrutinizer is complaining about (#765)

* Refactored code to improve scrutinizer score

* Bug fixes
This commit is contained in:
farhatahmad
2019-08-27 11:08:58 -04:00
committed by farhatahmad
parent fd6077696d
commit 01b8dbbd0e
33 changed files with 462 additions and 434 deletions

View File

@ -44,6 +44,19 @@ describe RecordingsController, type: :controller do
end
end
context "PATCH #rename" do
it "properly updates recording name and redirects to current page" do
allow_any_instance_of(BbbServer).to receive(:update_recording).and_return(updated: true)
@request.session[:user_id] = @user.id
name = Faker::Games::Pokemon.name
patch :rename, params: { meetingID: @room.bbb_id, record_id: Faker::IDNumber.valid, record_name: name }
expect(response).to redirect_to(@room)
end
end
context "DELETE #delete_recording" do
it "deletes the recording" do
allow_any_instance_of(BbbServer).to receive(:delete_recording).and_return(true)