diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-15 18:39:26 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-17 12:58:59 -0300 |
commit | 8e4e294a7cc8725869964cf56842124aec54ca12 (patch) | |
tree | d5acdaf8f25bd7e7d2420c152ba15964cae13ac3 /spec/services/boards | |
parent | 01b9744d1eb2bf9af80758ed5e112171b1b7f2b0 (diff) | |
download | gitlab-ce-8e4e294a7cc8725869964cf56842124aec54ca12.tar.gz |
Rename from/to params to from_list_id/to_list_id
Diffstat (limited to 'spec/services/boards')
-rw-r--r-- | spec/services/boards/issues/move_service_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index ca03ec2d904..a60f5a9c202 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -22,7 +22,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving from backlog' do it 'adds the label of the list it goes to' do issue = create(:labeled_issue, project: project, labels: [bug]) - params = { id: issue.iid, from: backlog.id, to: list1.id } + params = { id: issue.iid, from_list_id: backlog.id, to_list_id: list1.id } described_class.new(project, user, params).execute @@ -33,7 +33,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving to backlog' do it 'removes all list-labels' do issue = create(:labeled_issue, project: project, labels: [bug, development, testing]) - params = { id: issue.iid, from: list1.id, to: backlog.id } + params = { id: issue.iid, from_list_id: list1.id, to_list_id: backlog.id } described_class.new(project, user, params).execute @@ -44,7 +44,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving from backlog to done' do it 'closes the issue' do issue = create(:labeled_issue, project: project, labels: [bug]) - params = { id: issue.iid, from: backlog.id, to: done.id } + params = { id: issue.iid, from_list_id: backlog.id, to_list_id: done.id } described_class.new(project, user, params).execute issue.reload @@ -56,7 +56,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving an issue between lists' do let(:issue) { create(:labeled_issue, project: project, labels: [bug, development]) } - let(:params) { { id: issue.iid, from: list1.id, to: list2.id } } + let(:params) { { id: issue.iid, from_list_id: list1.id, to_list_id: list2.id } } it 'delegates the label changes to Issues::UpdateService' do expect_any_instance_of(Issues::UpdateService).to receive(:execute).with(issue).once @@ -73,7 +73,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving to done' do let(:issue) { create(:labeled_issue, project: project, labels: [bug, development, testing]) } - let(:params) { { id: issue.iid, from: list2.id, to: done.id } } + let(:params) { { id: issue.iid, from_list_id: list2.id, to_list_id: done.id } } it 'delegates the close proceedings to Issues::CloseService' do expect_any_instance_of(Issues::CloseService).to receive(:execute).with(issue).once @@ -92,7 +92,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving from done' do let(:issue) { create(:labeled_issue, :closed, project: project, labels: [bug]) } - let(:params) { { id: issue.iid, from: done.id, to: list2.id } } + let(:params) { { id: issue.iid, from_list_id: done.id, to_list_id: list2.id } } it 'delegates the re-open proceedings to Issues::ReopenService' do expect_any_instance_of(Issues::ReopenService).to receive(:execute).with(issue).once @@ -112,7 +112,7 @@ describe Boards::Issues::MoveService, services: true do context 'when moving from done to backlog' do it 'reopens the issue' do issue = create(:labeled_issue, :closed, project: project, labels: [bug]) - params = { id: issue.iid, from: done.id, to: backlog.id } + params = { id: issue.iid, from_list_id: done.id, to_list_id: backlog.id } described_class.new(project, user, params).execute issue.reload |