Commit ff77bdf6 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'pages-update-remove-shared-examples' into 'master'

Remove inlined shared examples

See merge request gitlab-org/gitlab!23504
parents 50aa5143 ef313585
......@@ -176,35 +176,6 @@ describe Projects::UpdatePagesService do
describe 'maximum pages artifacts size' do
let(:metadata) { spy('metadata') }
shared_examples 'pages size limit is' do |size_limit|
context "when size is below the limit" do
before do
allow(metadata).to receive(:total_size).and_return(size_limit - 1.megabyte)
end
it 'updates pages correctly' do
subject.execute
expect(deploy_status.description).not_to be_present
expect(project.pages_metadatum).to be_deployed
end
end
context "when size is above the limit" do
before do
allow(metadata).to receive(:total_size).and_return(size_limit + 1.megabyte)
end
it 'limits the maximum size of gitlab pages' do
subject.execute
expect(deploy_status.description)
.to match(/artifacts for pages are too large/)
expect(deploy_status).to be_script_failure
end
end
end
before do
file = fixture_file_upload('spec/fixtures/pages.zip')
metafile = fixture_file_upload('spec/fixtures/pages.zip.meta')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment