summaryrefslogtreecommitdiff
path: root/spec/services/boards
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
commit6b75320f525f841454f1ab162d141d3610f2e77b (patch)
tree4971c27759e4fbc18b85e71800c3b9c12346317e /spec/services/boards
parent4226aca420920c1844e8eade4798a2dff188a6fc (diff)
downloadgitlab-ce-6b75320f525f841454f1ab162d141d3610f2e77b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/boards')
-rw-r--r--spec/services/boards/issues/create_service_spec.rb2
-rw-r--r--spec/services/boards/lists/update_service_spec.rb8
-rw-r--r--spec/services/boards/visits/create_service_spec.rb4
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/services/boards/issues/create_service_spec.rb b/spec/services/boards/issues/create_service_spec.rb
index 33637419f83..ef7b7fdbaac 100644
--- a/spec/services/boards/issues/create_service_spec.rb
+++ b/spec/services/boards/issues/create_service_spec.rb
@@ -10,7 +10,7 @@ describe Boards::Issues::CreateService do
let(:label) { create(:label, project: project, name: 'in-progress') }
let!(:list) { create(:list, board: board, label: label, position: 0) }
- subject(:service) { described_class.new(board.parent, project, user, board_id: board.id, list_id: list.id, title: 'New issue') }
+ subject(:service) { described_class.new(board.resource_parent, project, user, board_id: board.id, list_id: list.id, title: 'New issue') }
before do
project.add_developer(user)
diff --git a/spec/services/boards/lists/update_service_spec.rb b/spec/services/boards/lists/update_service_spec.rb
index a5411a2fb3a..243e0fc50ad 100644
--- a/spec/services/boards/lists/update_service_spec.rb
+++ b/spec/services/boards/lists/update_service_spec.rb
@@ -9,9 +9,9 @@ describe Boards::Lists::UpdateService do
shared_examples 'moving list' do
context 'when user can admin list' do
it 'calls Lists::MoveService to update list position' do
- board.parent.add_developer(user)
+ board.resource_parent.add_developer(user)
- expect(Boards::Lists::MoveService).to receive(:new).with(board.parent, user, params).and_call_original
+ expect(Boards::Lists::MoveService).to receive(:new).with(board.resource_parent, user, params).and_call_original
expect_any_instance_of(Boards::Lists::MoveService).to receive(:execute).with(list)
service.execute(list)
@@ -30,7 +30,7 @@ describe Boards::Lists::UpdateService do
shared_examples 'updating list preferences' do
context 'when user can read list' do
it 'updates list preference for user' do
- board.parent.add_guest(user)
+ board.resource_parent.add_guest(user)
service.execute(list)
@@ -48,7 +48,7 @@ describe Boards::Lists::UpdateService do
end
describe '#execute' do
- let(:service) { described_class.new(board.parent, user, params) }
+ let(:service) { described_class.new(board.resource_parent, user, params) }
context 'when position parameter is present' do
let(:params) { { position: 1 } }
diff --git a/spec/services/boards/visits/create_service_spec.rb b/spec/services/boards/visits/create_service_spec.rb
index 6baf7ac9deb..203c287f396 100644
--- a/spec/services/boards/visits/create_service_spec.rb
+++ b/spec/services/boards/visits/create_service_spec.rb
@@ -10,7 +10,7 @@ describe Boards::Visits::CreateService do
let(:project) { create(:project) }
let(:project_board) { create(:board, project: project) }
- subject(:service) { described_class.new(project_board.parent, user) }
+ subject(:service) { described_class.new(project_board.resource_parent, user) }
it 'returns nil when there is no user' do
service.current_user = nil
@@ -35,7 +35,7 @@ describe Boards::Visits::CreateService do
let(:group) { create(:group) }
let(:group_board) { create(:board, group: group) }
- subject(:service) { described_class.new(group_board.parent, user) }
+ subject(:service) { described_class.new(group_board.resource_parent, user) }
it 'returns nil when there is no user' do
service.current_user = nil