Sha256: 412499da234d1b3464f9160170ce0033ace1c8dd3c6f662c7b8f2bfaa9f9f491

Contents?: true

Size: 581 Bytes

Versions: 22

Compression:

Stored size: 581 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: 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

22 entries across 22 versions & 1 rubygems

Version Path
pages_core-3.12.7 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.6 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.5 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.4 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.3 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.12.0 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.11.3 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.11.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.11.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.11.0 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.10.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.10.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.9.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.9.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.9.0 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.8.3 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.8.2 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb
pages_core-3.8.1 lib/rails/generators/pages_core/rspec/templates/page_templates_spec.rb