Commit f0de4b53 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix project update specs

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ab29ddcf
...@@ -6,14 +6,14 @@ describe Projects::UpdateService do ...@@ -6,14 +6,14 @@ describe Projects::UpdateService do
@user = create :user @user = create :user
@admin = create :user, admin: true @admin = create :user, admin: true
@project = create :project, creator_id: @user.id, namespace: @user.namespace @project = create :project, creator_id: @user.id, namespace: @user.namespace
@opts = { project: {} } @opts = {}
end end
context 'should be private when updated to private' do context 'should be private when updated to private' do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -25,7 +25,7 @@ describe Projects::UpdateService do ...@@ -25,7 +25,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -37,7 +37,7 @@ describe Projects::UpdateService do ...@@ -37,7 +37,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -56,7 +56,7 @@ describe Projects::UpdateService do ...@@ -56,7 +56,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -68,7 +68,7 @@ describe Projects::UpdateService do ...@@ -68,7 +68,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -80,7 +80,7 @@ describe Projects::UpdateService do ...@@ -80,7 +80,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @user, @opts) update_project(@project, @user, @opts)
end end
...@@ -92,7 +92,7 @@ describe Projects::UpdateService do ...@@ -92,7 +92,7 @@ describe Projects::UpdateService do
before do before do
@created_private = @project.private? @created_private = @project.private?
@opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @admin, @opts) update_project(@project, @admin, @opts)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment