Sha256: 37d9c6ee0cd4a160fc89737184083c205198bcc13fb4d68d4a8024ca0dd92309

Contents?: true

Size: 572 Bytes

Versions: 7

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

RSpec.describe "Page templates", type: :system do
  subject { page }

  let(:page_model) do
    create(:page,
           template:,
           headline: "My headline",
           body: "My body",
           excerpt: "My excerpt")
  end
  let(:template) { "index" }
  let(:locale) { I18n.default_locale }

  before do
    visit page_path(locale, page_model)
  end

  describe "default template" do
    it { is_expected.to have_text(page_model.headline) }
    it { is_expected.to have_text(page_model.body) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pages_core-3.15.5 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.15.4 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.15.3 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.15.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.15.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.14.0 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.13.0 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb