summaryrefslogtreecommitdiff
path: root/spec/controllers/projects_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-rw-r--r--spec/controllers/projects_controller_spec.rb7
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')