Commit f504af25 authored by Uģis Ozols's avatar Uģis Ozols
Browse files

Fix failing controller specs by stubbing refinery_user_required?.

In Refinery CMS 2.0.x we require user with refinery role to be present
even if we visit only frontend pages. In Refinery CMS 2.1.x this check
was changed to apply only to backend stuff so in order for specs to pass
we need to a) create refinery user or b) stub refinery_user_required?
and return false.
parent eabf9df1
......@@ -5,6 +5,7 @@ module Refinery
describe ItemsController do
let!(:item) { FactoryGirl.create(:news_item) }
let(:page) { Refinery::Page.where(:link_url => "/news").first }
before { controller.stub(:refinery_user_required?).and_return(false) }
describe "#index" do
it "assigns items and page" do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment