Uses head_and_get to check for Readme and Changelog locations

This commit is contained in:
erwanlr
2019-03-24 22:01:19 +00:00
parent f1d15ca7f2
commit 15fd3b969f
2 changed files with 17 additions and 12 deletions

View File

@@ -22,8 +22,9 @@ shared_examples 'App::Views::MainTheme' do
before do
expect(target).to receive(:content_dir).at_least(1).and_return('wp-content')
# Stub the checks for error/debug logs and readmes to 404
stub_request(:head, /.*/).and_return(status: 404)
# Stub all requests to 200, to detect a readme and changelog.
# Detection of the error_log will fail as the empty body won't match the patterns
stub_request(:head, /.*/)
stub_request(:get, /.*/)
stub_request(:get, /.*\.css\z/)