diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-05-19 19:20:06 -0400 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-19 19:47:07 -0400 |
commit | 6fb9bf87c4f202dee9815c10cad9486a1077cc99 (patch) | |
tree | 95d66da109d5fe1f9095e0892e46c5bd01f43ebc /spec/controllers | |
parent | fc9844e8e1955359eae5b159069a90a993c667d1 (diff) | |
download | gitlab-ce-6fb9bf87c4f202dee9815c10cad9486a1077cc99.tar.gz |
Use the right default notification settings for non membersissue_9013
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 685fe9ffe0b..91b46c4d65c 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -24,20 +24,20 @@ describe ProjectsController do context "and does not have notification setting" do it "initializes notification as disabled" do get :show, namespace_id: public_project.namespace.path, id: public_project.path - expect(assigns(:notification_setting).level).to eq("disabled") + expect(assigns(:notification_setting).level).to eq("global") end end context "and has notification setting" do before do setting = user.notification_settings_for(public_project) - setting.level = :global + setting.level = :watch setting.save end it "shows current notification setting" do get :show, namespace_id: public_project.namespace.path, id: public_project.path - expect(assigns(:notification_setting).level).to eq("global") + expect(assigns(:notification_setting).level).to eq("watch") end end end @@ -45,6 +45,7 @@ describe ProjectsController do context "rendering default project view" do render_views + it "renders the activity view" do allow(controller).to receive(:current_user).and_return(user) allow(user).to receive(:project_view).and_return('activity') |