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:
authorDouwe Maan <douwe@gitlab.com>2015-03-24 18:58:44 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-27 13:10:56 +0300
commit1d829ca15102b62fe2eab1287d4c33f1add9d239 (patch)
tree21d690e5a2adab0ac5ecba552acc7079e7329488 /spec
parent5f93b0e3da9f84f44c5f00af5d3e48c277d68d5b (diff)
Fix tests.
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/regex_spec.rb16
-rw-r--r--spec/requests/api/projects_spec.rb2
-rw-r--r--spec/requests/api/users_spec.rb4
3 files changed, 11 insertions, 11 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb
index 1db9f15b790..727884c41c5 100644
--- a/spec/lib/gitlab/regex_spec.rb
+++ b/spec/lib/gitlab/regex_spec.rb
@@ -1,14 +1,14 @@
require 'spec_helper'
describe Gitlab::Regex do
- describe 'path regex' do
- it { expect('gitlab-ce').to match(Gitlab::Regex.path_regex) }
- it { expect('gitlab_git').to match(Gitlab::Regex.path_regex) }
- it { expect('_underscore.js').to match(Gitlab::Regex.path_regex) }
- it { expect('100px.com').to match(Gitlab::Regex.path_regex) }
- it { expect('?gitlab').not_to match(Gitlab::Regex.path_regex) }
- it { expect('git lab').not_to match(Gitlab::Regex.path_regex) }
- it { expect('gitlab.git').not_to match(Gitlab::Regex.path_regex) }
+ describe 'project path regex' do
+ it { expect('gitlab-ce').to match(Gitlab::Regex.project_path_regex) }
+ it { expect('gitlab_git').to match(Gitlab::Regex.project_path_regex) }
+ it { expect('_underscore.js').to match(Gitlab::Regex.project_path_regex) }
+ it { expect('100px.com').to match(Gitlab::Regex.project_path_regex) }
+ it { expect('?gitlab').not_to match(Gitlab::Regex.project_path_regex) }
+ it { expect('git lab').not_to match(Gitlab::Regex.project_path_regex) }
+ it { expect('gitlab.git').not_to match(Gitlab::Regex.project_path_regex) }
end
describe 'project name regex' do
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 9868b8694cb..b713f1fe898 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -252,7 +252,7 @@ describe API::API, api: true do
expect(json_response['message']['path']).to eq([
'can\'t be blank',
'is too short (minimum is 0 characters)',
- Gitlab::Regex.send(:default_regex_message)
+ Gitlab::Regex.send(:project_path_regex_message)
])
end
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 081400cdedd..e6d5545f812 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -140,7 +140,7 @@ describe API::API, api: true do
expect(json_response['message']['projects_limit']).
to eq(['must be greater than or equal to 0'])
expect(json_response['message']['username']).
- to eq([Gitlab::Regex.send(:default_regex_message)])
+ to eq([Gitlab::Regex.send(:namespace_regex_message)])
end
it "shouldn't available for non admin users" do
@@ -266,7 +266,7 @@ describe API::API, api: true do
expect(json_response['message']['projects_limit']).
to eq(['must be greater than or equal to 0'])
expect(json_response['message']['username']).
- to eq([Gitlab::Regex.send(:default_regex_message)])
+ to eq([Gitlab::Regex.send(:namespace_regex_message)])
end
context "with existing user" do