Sha256: f52269239c08da16adfa9511a3960cd04f259cebce827e35bcbec844b222e52e

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe PagesController, type: :controller do
  render_views

  before(:all) do
    @root = FactoryGirl.create(:structure_main)
  end

  context 'page' do
    before(:each) { @page = FactoryGirl.create(:structure_page, parent: @root) }

    it 'should render show action' do
      get :show, id: @page.slug

      assigns(:structure).should == @page

      response.should be_success
      response.should render_template('show')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sunrise-cms-1.1.1 lib/generators/sunrise/templates/spec/controllers/pages_controller_spec.rb
sunrise-cms-1.1.0 lib/generators/sunrise/templates/spec/controllers/pages_controller_spec.rb