Commit ed2daff7 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'toon-feature-test-license' into 'master'

Test if project page loads with unrecognized LICENSE

See merge request gitlab-org/gitlab!70580
parents cbe479b3 e874cc36
......@@ -312,6 +312,17 @@ RSpec.describe ProjectsController do
expect { get_show }.not_to change { Gitlab::GitalyClient.get_request_count }
end
it "renders files even with invalid license" do
controller.instance_variable_set(:@project, public_project)
expect(public_project.repository).to receive(:license_key).and_return('woozle wuzzle').at_least(:once)
get_show
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template('_files')
expect(response.body).to have_content('LICENSE') # would be 'MIT license' if stub not works
end
end
context "when the url contains .atom" 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