From 6fb9bf87c4f202dee9815c10cad9486a1077cc99 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Thu, 19 May 2016 19:20:06 -0400 Subject: Use the right default notification settings for non members --- spec/controllers/projects_controller_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec/controllers') 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') -- cgit v1.2.3