diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-10-16 13:21:51 -0700 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-10-16 15:33:20 -0700 |
commit | a42d7980af0ccad036a68cb5497049464be0b2dc (patch) | |
tree | d2137e752d0b450e7341bd8475507aad8ee5b99f /spec/controllers | |
parent | 30083458b9e2a1e9e54ea09aea8c037e76732af4 (diff) | |
download | gitlab-ce-a42d7980af0ccad036a68cb5497049464be0b2dc.tar.gz |
Add readme only option as project view
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 0544afe31ed..7569052c3aa 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -222,6 +222,14 @@ describe ProjectsController do get :show, namespace_id: public_project.namespace, id: public_project expect(response).to render_template('_files') end + + it "renders the readme view" do + allow(controller).to receive(:current_user).and_return(user) + allow(user).to receive(:project_view).and_return('readme') + + get :show, namespace_id: public_project.namespace, id: public_project + expect(response).to render_template('_readme') + end end context "when the url contains .atom" do |