mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
add more specs for Image Lightbox on Subfolder Install
This commit is contained in:
parent
4960b62110
commit
cf1fefe236
1 changed files with 15 additions and 0 deletions
|
@ -84,12 +84,22 @@ describe FileStore::LocalStore do
|
|||
|
||||
end
|
||||
|
||||
def stub_for_subfolder
|
||||
GlobalSetting.stubs(:relative_url_root).returns('/forum')
|
||||
Discourse.stubs(:base_uri).returns("/forum")
|
||||
end
|
||||
|
||||
describe ".absolute_base_url" do
|
||||
|
||||
it "is present" do
|
||||
expect(store.absolute_base_url).to eq("http://test.localhost/uploads/default")
|
||||
end
|
||||
|
||||
it "supports subfolder" do
|
||||
stub_for_subfolder
|
||||
expect(store.absolute_base_url).to eq("http://test.localhost/forum/uploads/default")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe ".relative_base_url" do
|
||||
|
@ -98,6 +108,11 @@ describe FileStore::LocalStore do
|
|||
expect(store.relative_base_url).to eq("/uploads/default")
|
||||
end
|
||||
|
||||
it "supports subfolder" do
|
||||
stub_for_subfolder
|
||||
expect(store.relative_base_url).to eq("/forum/uploads/default")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
it "is internal" do
|
||||
|
|
Loading…
Reference in a new issue