diff options
author | Alex Braha Stoll <alexbrahastoll@gmail.com> | 2016-12-19 02:37:10 +0300 |
---|---|---|
committer | Alex Braha Stoll <alexbrahastoll@gmail.com> | 2016-12-31 21:55:50 +0300 |
commit | 5607bb8f0921cbfa4586bb7b92acb6666a65b4e2 (patch) | |
tree | 0a2b529ff31fd7810d5dfa0eb38c709657ff40b4 /spec/models/wiki_page_spec.rb | |
parent | 904aa039e5ccb4d9f653d254ea5818be130fb218 (diff) |
Change WikiPage#directory to always start a directory hierarchy with '/'
Diffstat (limited to 'spec/models/wiki_page_spec.rb')
-rw-r--r-- | spec/models/wiki_page_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index c40a89b9dfb..91d5fccce60 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -27,7 +27,7 @@ describe WikiPage, models: true do page_2 = wiki.find_page('dir_1/page_2') page_3 = wiki.find_page('dir_1/dir_2/page_3') expected_grouped_pages = { - '/' => [page_1], 'dir_1' => [page_2], 'dir_1/dir_2' => [page_3] + '/' => [page_1], '/dir_1' => [page_2], '/dir_1/dir_2' => [page_3] } grouped_pages = WikiPage.group_by_directory(wiki.pages) @@ -239,7 +239,7 @@ describe WikiPage, models: true do create_page('dir_1/dir_1_1/file', 'content') page = wiki.find_page('dir_1/dir_1_1/file') - expect(page.directory).to eq('dir_1/dir_1_1') + expect(page.directory).to eq('/dir_1/dir_1_1') end end end |