diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin/users_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/controllers/uploads_controller_spec.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index 1d1653e67e3..afe21c8b34a 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -123,7 +123,7 @@ describe Admin::UsersController do put :deactivate, params: { id: user.username } user.reload expect(user.deactivated?).to be_falsey - expect(flash[:notice]).to eq("The user you are trying to deactivate has been active in the past 14 days and cannot be deactivated") + expect(flash[:notice]).to eq("The user you are trying to deactivate has been active in the past #{::User::MINIMUM_INACTIVE_DAYS} days and cannot be deactivated") end end end diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index dd7ab4f9d47..1bcf3bb106b 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -7,9 +7,9 @@ shared_examples 'content 5 min private cached with revalidation' do end end -shared_examples 'content long term private cached with revalidation' do +shared_examples 'content not cached' do it 'ensures content will not be cached without revalidation' do - expect(subject['Cache-Control']).to eq('max-age=15778476, private, must-revalidate') + expect(subject['Cache-Control']).to eq('max-age=0, private, must-revalidate') end end @@ -490,7 +490,7 @@ describe UploadsController do expect(response).to have_gitlab_http_status(200) end - it_behaves_like 'content long term private cached with revalidation' do + it_behaves_like 'content not cached' do subject do get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' } @@ -510,7 +510,7 @@ describe UploadsController do expect(response).to have_gitlab_http_status(200) end - it_behaves_like 'content long term private cached with revalidation' do + it_behaves_like 'content not cached' do subject do get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' } @@ -563,7 +563,7 @@ describe UploadsController do expect(response).to have_gitlab_http_status(200) end - it_behaves_like 'content long term private cached with revalidation' do + it_behaves_like 'content not cached' do subject do get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' } |