GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 6c5e20c1 authored by Mike Greiling's avatar Mike Greiling

update all status_code calls to use new inspect_requests helper

parent b5c211ba
......@@ -2,6 +2,7 @@ require 'rails_helper'
feature 'User creates snippet', :js do
include DropzoneHelper
include InspectRequests
let(:user) { create(:user) }
......@@ -43,8 +44,8 @@ feature 'User creates snippet', :js do
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/temp/\h{32}/banana_sample\.gif\z})
visit(link)
expect(page.status_code).to eq(200)
reqs = inspect_requests { visit(link) }
expect(reqs.first.status_code).to eq(200)
end
end
......@@ -61,8 +62,8 @@ feature 'User creates snippet', :js do
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/personal_snippet/#{Snippet.last.id}/\h{32}/banana_sample\.gif\z})
visit(link)
expect(page.status_code).to eq(200)
reqs = inspect_requests { visit(link) }
expect(reqs.first.status_code).to eq(200)
end
scenario 'validation fails for the first time' do
......@@ -86,8 +87,8 @@ feature 'User creates snippet', :js do
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/personal_snippet/#{Snippet.last.id}/\h{32}/banana_sample\.gif\z})
visit(link)
expect(page.status_code).to eq(200)
reqs = inspect_requests { visit(link) }
expect(reqs.first.status_code).to eq(200)
end
scenario 'Authenticated user creates a snippet with + in filename' do
......
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