Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-11-05 15:58:51 +0300
committerMarin Jankovski <maxlazio@gmail.com>2014-11-05 18:03:45 +0300
commit6d775ddae4e561b9a932177fdaf5f6a4a16030a2 (patch)
treed47178dfe87f58c5f54febf528449ce4c985e173 /spec
parent2ee1ec430012e4489ea1d70a13bcb827cafede2e (diff)
Fix tests after change to regex validation message.
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/projects_spec.rb5
-rw-r--r--spec/requests/api/users_spec.rb6
2 files changed, 4 insertions, 7 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index cb7a2705573..067935c82a6 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -209,9 +209,8 @@ describe API::API, api: true do
json_response['message']['path'].should == [
'can\'t be blank',
'is too short (minimum is 0 characters)',
- 'can contain only letters, digits, \'_\', \'-\' and \'.\'. It must '\
- 'start with letter, digit or \'_\', optionally preceeded by \'.\'. '\
- 'It must not end in \'.git\'.'
+ 'can contain only letters, digits, \'_\', \'-\' and \'.\'. ' \
+ 'Cannot start with \'-\' or end in \'.git\''
]
end
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 3bb6191ed9f..a1a26d80a14 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -141,8 +141,7 @@ describe API::API, api: true do
should == ['must be greater than or equal to 0']
json_response['message']['username'].
should == ['can contain only letters, digits, '\
- '\'_\', \'-\' and \'.\'. It must start with letter, digit or '\
- '\'_\', optionally preceeded by \'.\'. It must not end in \'.git\'.']
+ '\'_\', \'-\' and \'.\'. Cannot start with \'-\' or end in \'.git\'']
end
it "shouldn't available for non admin users" do
@@ -285,8 +284,7 @@ describe API::API, api: true do
should == ['must be greater than or equal to 0']
json_response['message']['username'].
should == ['can contain only letters, digits, '\
- '\'_\', \'-\' and \'.\'. It must start with letter, digit or '\
- '\'_\', optionally preceeded by \'.\'. It must not end in \'.git\'.']
+ '\'_\', \'-\' and \'.\'. Cannot start with \'-\' or end in \'.git\'']
end
context "with existing user" do