Skip to content
Snippets Groups Projects
Commit df2336ec authored by iaibrys's avatar iaibrys
Browse files

Fix DB.

parent 81748798
Branches
Tags v1.5.188
No related merge requests found
Pipeline #348 passed
...@@ -18,12 +18,16 @@ RSpec.describe MdSinglePageController, type: :controller do ...@@ -18,12 +18,16 @@ RSpec.describe MdSinglePageController, type: :controller do
expect(response.body).to include('Page \"Fake\" or \"Fake-right\" does not exist. Maybe update from the admin page?') expect(response.body).to include('Page \"Fake\" or \"Fake-right\" does not exist. Maybe update from the admin page?')
end end
it 'returns http success existing page' do it 'returns http success existing page' do
ap "Outside FAKEFS: #{Webpacker.manifest.lookup('styles.css')}"
ap "Outside FAKEFS: #{Webpacker.manifest.lookup('styles.css')}"
FakeFS do FakeFS do
FakeFS::FileSystem.clone(pages_files) FakeFS::FileSystem.clone(pages_files)
FakeFS::FileSystem.clone(File.join(Rails.root, 'app/views')) # https://github.com/fakefs/fakefs/issues/136 FakeFS::FileSystem.clone(File.join(Rails.root, 'app/views')) # https://github.com/fakefs/fakefs/issues/136
FakeFS::FileSystem.clone(File.join(Rails.root, 'spec/files')) FakeFS::FileSystem.clone(File.join(Rails.root, 'spec/files'))
FakeFS::FileSystem.clone(File.join(Rails.root, 'public')) FakeFS::FileSystem.clone(File.join(Rails.root, 'public'))
FakeFS::FileSystem.clone(File.join(Rails.root, 'config')) FakeFS::FileSystem.clone(File.join(Rails.root, 'config'))
ap "In FAKEFS: #{Webpacker.manifest.ai}"
#ap "In FAKEFS: #{Webpacker.manifest.lookup('styles.css')}"
allow_any_instance_of(PagesService).to receive(:raw_md_folder).and_return(pages_files) allow_any_instance_of(PagesService).to receive(:raw_md_folder).and_return(pages_files)
allow_any_instance_of(PagesService).to receive(:compiled_folder).and_return(pages_files) allow_any_instance_of(PagesService).to receive(:compiled_folder).and_return(pages_files)
get :show, params: { course_id: @test_course_id, page: 'TestPage', mode: 'view' } get :show, params: { course_id: @test_course_id, page: 'TestPage', mode: 'view' }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment