Fix reset of tasks

This commit is contained in:
Jan Renz
2015-04-20 22:30:31 +02:00
parent 30985a249e
commit 9c8d0b01eb
7 changed files with 24 additions and 15 deletions

View File

@ -202,23 +202,20 @@ describe ExercisesController do
describe 'GET #show' do
context 'as admin' do
before(:each) { get :show, id: exercise.id }
expect_assigns(exercise: :exercise)
expect_status(200)
expect_template(:show)
end
context 'as internal user' do
let(:user) { FactoryGirl.create(:internal_user) }
before(:each) { get :show, id: exercise.id }
end
describe 'GET #reload' do
context 'as anyone' do
before(:each) { get :reload, format: :json, id: exercise.id }
expect_assigns(exercise: :exercise)
expect_status(200)
expect_template(:show)
end
context 'as external user' do
let(:user) { FactoryGirl.create(:external_user) }
before(:each) { get :show, id: exercise.id }
expect_assigns(exercise: :exercise)
expect_status(200)
expect_template(:show)
expect_template(:reload)
end
end