2019-10-21 22:57:48 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe AboutController, type: :controller do
|
2020-03-22 12:22:10 +00:00
|
|
|
it "renders the staff template" do
|
|
|
|
get :staff
|
|
|
|
expect(response).to render_template("staff")
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'as an admin' do
|
|
|
|
let!(:admin) { create(:user, :admin) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
login_admin
|
2019-10-21 22:57:48 +00:00
|
|
|
end
|
2020-03-22 12:22:10 +00:00
|
|
|
|
|
|
|
it "renders the adminpanel template" do
|
|
|
|
get :adminpanel
|
|
|
|
expect(response).to render_template("adminpanel")
|
|
|
|
end
|
|
|
|
|
|
|
|
it "renders the statistics template" do
|
|
|
|
get :statistics
|
|
|
|
expect(response).to render_template("statistics")
|
2019-10-21 22:57:48 +00:00
|
|
|
end
|
2020-03-22 12:22:10 +00:00
|
|
|
end
|
2019-10-21 22:57:48 +00:00
|
|
|
end
|