Sha256: 8dea5e114122c1be01ba7599078a9304e707ce150c769a4c4555d4718f764932
Contents?: true
Size: 864 Bytes
Versions: 14
Compression:
Stored size: 864 Bytes
Contents
require 'spec_helper' module Landable::Public::Preview describe PagesController do routes { Landable::Engine.routes } describe '#show' do let(:page) { create :page, body: '<p>hello</p>' } before(:each) do page.publish! author: create(:author) page.update_attributes! body: '<p>why hello there</p>' end def make_request get :show, id: page.id end it 'renders the page in situ' do make_request response.body.should include '<p>why hello there</p>' end it 'renders the preview message' do make_request response.body.should include 'Preview Mode' end it 'is available at /-/p/:id' do assert_recognizes({controller: 'landable/public/preview/pages', action: 'show', id: page.id}, "/-/p/#{page.id}") end end end end
Version data entries
14 entries across 14 versions & 1 rubygems