mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
26 lines
582 B
Ruby
26 lines
582 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe AboutController, type: :controller do
|
|
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
|
|
end
|
|
|
|
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")
|
|
end
|
|
end
|
|
end
|