-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix conference view to allow images from admin and spec file (#110)
* Fix conference view to allow images from admin and spec file * fix quotations to satisfy rspec * Fix rspec require in factories * visit_component has component to visit * Create short_description to host the img tag * include manifest name as conferences * :conferences as manifest_name * Fix some problems in the spec * WIP: Remove img * Fix test --------- Co-authored-by: Francisco Bolívar <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe "Conference with images", type: :system do | ||
let(:organization) { create :organization } | ||
let(:short_description) { { en: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><img src=\"/favicon.ico\">" } } | ||
let!(:conference) { create :conference, organization: organization, short_description: short_description } | ||
|
||
before do | ||
switch_to_host(organization.host) | ||
page.visit "/conferences/#{conference.slug}" | ||
end | ||
|
||
it "shows the image" do | ||
within "#content" do | ||
expect(page).to have_xpath("//img[contains(@src,'favicon.ico')]") | ||
end | ||
end | ||
end |