Sha256: 601118aff4ba7f6a33903bf20fae78121c91e07f6aa91c3cfc91c2d4f694f3be
Contents?: true
Size: 723 Bytes
Versions: 83
Compression:
Stored size: 723 Bytes
Contents
require 'spec_helper' describe Tenon::IndexController do routes { Tenon::Engine.routes } let(:user) do double( :staff? => true, :is_super_admin? => false, :is_admin? => true ) end let(:generator) { double(generate: 'test') } before do controller.stub(:current_user) { user } stub_const('Tenon::WarningGenerator', generator) end describe 'GET index' do it 'should assign the warnings from the Tenon::WarningGenerator' do get :index expect(assigns[:warnings]).to eq Tenon::WarningGenerator.generate end it 'should assign the callouts' do get :index expect(assigns[:tenon_callouts]).to eq Tenon::TenonCallout.published end end end
Version data entries
83 entries across 83 versions & 1 rubygems