summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-06 18:56:12 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-02-06 18:56:12 +0000
commit1f86e54910895b1683449d7aee6adbe3a1cc44a0 (patch)
treed36de19bd9fb8b79226c69b1f239d7733e8575c0 /spec/services
parente776096e84d01ab3d1d07a028b65e7430e195114 (diff)
parent4f335663068bb0c52e7258013ee607891a662d6c (diff)
downloadgitlab-ce-1f86e54910895b1683449d7aee6adbe3a1cc44a0.tar.gz
Merge branch 'dm-route-path-validation' into 'master'
Validate user, group and project paths consistently, and only once See merge request gitlab-org/gitlab-ce!16903
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/groups/transfer_service_spec.rb2
-rw-r--r--spec/services/users/update_service_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/groups/transfer_service_spec.rb b/spec/services/groups/transfer_service_spec.rb
index bcc01b087f3..e1c873f8c1e 100644
--- a/spec/services/groups/transfer_service_spec.rb
+++ b/spec/services/groups/transfer_service_spec.rb
@@ -177,7 +177,7 @@ describe Groups::TransferService, :postgresql do
it 'should add an error on group' do
transfer_service.execute(new_parent_group)
- expect(transfer_service.error).to eq('Transfer failed: Validation failed: Route path has already been taken, Route is invalid')
+ expect(transfer_service.error).to eq('Transfer failed: Validation failed: Path has already been taken')
end
end
diff --git a/spec/services/users/update_service_spec.rb b/spec/services/users/update_service_spec.rb
index f8d4a47b212..a4b7fe4674f 100644
--- a/spec/services/users/update_service_spec.rb
+++ b/spec/services/users/update_service_spec.rb
@@ -21,13 +21,13 @@ describe Users::UpdateService do
end
it 'includes namespace error messages' do
- create(:group, name: 'taken', path: 'something_else')
+ create(:group, path: 'taken')
result = {}
expect do
result = update_user(user, { username: 'taken' })
end.not_to change { user.reload.username }
expect(result[:status]).to eq(:error)
- expect(result[:message]).to eq('Namespace name has already been taken')
+ expect(result[:message]).to eq('Username has already been taken')
end
def update_user(user, opts)