diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-06 18:56:12 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-06 18:56:12 +0000 |
commit | 1f86e54910895b1683449d7aee6adbe3a1cc44a0 (patch) | |
tree | d36de19bd9fb8b79226c69b1f239d7733e8575c0 /spec/services | |
parent | e776096e84d01ab3d1d07a028b65e7430e195114 (diff) | |
parent | 4f335663068bb0c52e7258013ee607891a662d6c (diff) | |
download | gitlab-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.rb | 2 | ||||
-rw-r--r-- | spec/services/users/update_service_spec.rb | 4 |
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) |