summaryrefslogtreecommitdiff
path: root/spec/models/wiki_page_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/wiki_page_spec.rb')
-rw-r--r--spec/models/wiki_page_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index be5479cfc11..8ed7abc968b 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -192,16 +192,17 @@ describe WikiPage do
expect(subject).not_to be_valid
expect(subject.errors[:title]).to contain_exactly(
- "exceeds the limit of #{max_title} bytes for page titles"
+ "exceeds the limit of #{max_title} bytes"
)
end
it 'rejects directories exceeding the limit' do
- subject.title = invalid_directory + '/foo'
+ subject.title = "#{invalid_directory}/#{invalid_directory}2/foo"
expect(subject).not_to be_valid
expect(subject.errors[:title]).to contain_exactly(
- "exceeds the limit of #{max_directory} bytes for directory names"
+ "exceeds the limit of #{max_directory} bytes for directory name \"#{invalid_directory}\"",
+ "exceeds the limit of #{max_directory} bytes for directory name \"#{invalid_directory}2\""
)
end
@@ -210,8 +211,8 @@ describe WikiPage do
expect(subject).not_to be_valid
expect(subject.errors[:title]).to contain_exactly(
- "exceeds the limit of #{max_title} bytes for page titles",
- "exceeds the limit of #{max_directory} bytes for directory names"
+ "exceeds the limit of #{max_title} bytes",
+ "exceeds the limit of #{max_directory} bytes for directory name \"#{invalid_directory}\""
)
end
end