add more specs for Image Lightbox on Subfolder Install

This commit is contained in:
Neil Lalonde 2016-04-20 15:42:13 -04:00
parent 4960b62110
commit cf1fefe236

View file

@ -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