Skip to content

Commit

Permalink
Fix tinymce feature spec
Browse files Browse the repository at this point in the history
This feature spec failed with Rails 6.1 as it was defaulting to example.com instead of 127.0.0.1.

Setting `asset_host` inside the test is more explicit as it was before and reflects what an actual app does.
  • Loading branch information
robinboening committed Mar 23, 2021
1 parent 6bb39ef commit 984ad13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/features/admin/tinymce_feature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

context "with asset host" do
before do
expect(ActionController::Base.config).to receive(:asset_host_set?).and_return(true)
ActionController::Base.config.asset_host = "myhost.com"
end

it "base path should be set to tinymce asset folder" do
visit admin_dashboard_path
expect(page).to have_content(
"var tinyMCEPreInit = { base: 'http://127.0.0.1/assets/tinymce', suffix: '.min' };",
"var tinyMCEPreInit = { base: 'http://myhost.com/assets/tinymce', suffix: '.min' };",
)
end
end
Expand Down

0 comments on commit 984ad13

Please sign in to comment.