summaryrefslogtreecommitdiff
path: root/spec/validators
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-22 20:08:33 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-23 20:38:35 -0500
commitb0498c176fa134761d899c9b369be12f1ca789c5 (patch)
treedcf223813e0b1bb5932a94793a6f827771517a96 /spec/validators
parented16c351c5acdf1ad2e401e72490320d06af6e91 (diff)
downloadgitlab-ce-b0498c176fa134761d899c9b369be12f1ca789c5.tar.gz
Remove changes that are not absolutely necessarydm-fix-routes
Diffstat (limited to 'spec/validators')
-rw-r--r--spec/validators/dynamic_path_validator_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/validators/dynamic_path_validator_spec.rb b/spec/validators/dynamic_path_validator_spec.rb
index 5f998e78f07..03e23781d1b 100644
--- a/spec/validators/dynamic_path_validator_spec.rb
+++ b/spec/validators/dynamic_path_validator_spec.rb
@@ -15,31 +15,31 @@ describe DynamicPathValidator do
end
context 'for group' do
- it 'calls valid_group_path?' do
+ it 'calls valid_namespace_path?' do
group = build(:group, :nested, path: 'activity')
- expect(described_class).to receive(:valid_group_path?).with(group.full_path).and_call_original
+ expect(described_class).to receive(:valid_namespace_path?).with(group.full_path).and_call_original
expect(validator.path_valid_for_record?(group, 'activity')).to be_falsey
end
end
context 'for user' do
- it 'calls valid_user_path?' do
+ it 'calls valid_namespace_path?' do
user = build(:user, username: 'activity')
- expect(described_class).to receive(:valid_user_path?).with(user.full_path).and_call_original
+ expect(described_class).to receive(:valid_namespace_path?).with(user.full_path).and_call_original
expect(validator.path_valid_for_record?(user, 'activity')).to be_truthy
end
end
context 'for user namespace' do
- it 'calls valid_user_path?' do
+ it 'calls valid_namespace_path?' do
user = create(:user, username: 'activity')
namespace = user.namespace
- expect(described_class).to receive(:valid_user_path?).with(namespace.full_path).and_call_original
+ expect(described_class).to receive(:valid_namespace_path?).with(namespace.full_path).and_call_original
expect(validator.path_valid_for_record?(namespace, 'activity')).to be_truthy
end
@@ -52,7 +52,7 @@ describe DynamicPathValidator do
validator.validate_each(group, :path, "Path with spaces, and comma's!")
- expect(group.errors[:path]).to include(Gitlab::PathRegex.namespace_format_message)
+ expect(group.errors[:path]).to include(Gitlab::Regex.namespace_regex_message)
end
it 'adds a message when the path is not in the correct format' do