GRN2-xx: Email and admin fix (#515)

* Email and admin fix

* Redirected super_admins to the admins page

* Small fix

* Update rooms_controller.rb
This commit is contained in:
farhatahmad
2019-05-09 18:07:18 -04:00
committed by Jesus Federico
parent 63ada8b3db
commit 75bde6a42d
10 changed files with 58 additions and 27 deletions

View File

@ -97,6 +97,15 @@ describe RoomsController, type: :controller do
expect(assigns(:name)).to eql("")
end
it "redirects to admin if user is a super_admin" do
@request.session[:user_id] = @owner.id
@owner.add_role :super_admin
get :show, params: { room_uid: @owner.main_room, search: :none }
expect(response).to redirect_to(admins_path)
end
end
describe "POST #create" do