Sha256: 9c9e32cfca19f9a0443a0cc00215daffcdda2d9605fd45e2e6c445ed1ea6ca75
Contents?: true
Size: 1.33 KB
Versions: 5
Compression:
Stored size: 1.33 KB
Contents
require 'rails_helper' RSpec.describe 'pwb/welcome/index', type: :view do include Pwb::ApplicationHelper before do view.extend Pwb::ApplicationHelper end # before(:each) do # @content = assign(:content, Pwb::Content.create!()) # end before(:each) do assign(:current_agency, Pwb::Agency.unique_instance) # assign(:about_us, Pwb::Content.create!({key: 'aboutUs'})) assign(:carousel_items, [ Pwb::Content.create!, Pwb::Content.create! ]) assign(:content_area_cols, [ Pwb::Content.create!, Pwb::Content.create! ]) assign(:properties_for_sale, []) assign(:properties_for_rent, []) end it 'renders index successfully' do render expect(rendered).to include 'homepageCarousel' # assert_select "form[action=?][method=?]", welcome_path(@welcome), "post" do # end end # context 'when about_us content is not set' do # it 'does not render about_us section' do # assign(:about_us, nil) # render # expect(rendered).to_not include 'About us' # end # end # context 'when the product has a url' do # it 'displays the url' do # assign(:product, build(:product, url: 'http://example.com') # render # expect(rendered).to have_link 'Product', href: 'http://example.com' # end # end end
Version data entries
5 entries across 5 versions & 1 rubygems