summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-03-06 14:49:31 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-03-06 14:49:59 -0600
commit1565d7f6e602258c587bfa0e5606f671b14b7e3c (patch)
tree136c512f222d8d9e12c430f36182b82cbf029c46
parentb70d151db99d6d64f3514006c4fa6c8142e1b785 (diff)
downloadgitlab-ce-1565d7f6e602258c587bfa0e5606f671b14b7e3c.tar.gz
Remove readme-only project view preferenceremove-readme-option
-rw-r--r--app/helpers/preferences_helper.rb5
-rw-r--r--changelogs/unreleased/remove-readme-option.yml4
-rw-r--r--spec/controllers/projects_controller_spec.rb8
3 files changed, 6 insertions, 11 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index 74cccb23956..710218082f2 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -35,9 +35,8 @@ module PreferencesHelper
def project_view_choices
[
- ['Readme', :readme],
- ['Activity view', :activity],
- ['Files and Readme (default)', :files]
+ ['Files and Readme (default)', :files],
+ ['Activity view', :activity]
]
end
diff --git a/changelogs/unreleased/remove-readme-option.yml b/changelogs/unreleased/remove-readme-option.yml
new file mode 100644
index 00000000000..1d4c862c00e
--- /dev/null
+++ b/changelogs/unreleased/remove-readme-option.yml
@@ -0,0 +1,4 @@
+---
+title: Remove readme-only project view preference
+merge_request:
+author:
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 202759664a0..a1ec41322ad 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -158,14 +158,6 @@ describe ProjectsController do
expect(response).to render_template('_activity')
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
-
it "renders the files view" do
allow(controller).to receive(:current_user).and_return(user)
allow(user).to receive(:project_view).and_return('files')