diff --git a/app/views/problems/show.ics.haml b/app/views/problems/show.ics.haml index 835448a..0463a10 100644 --- a/app/views/problems/show.ics.haml +++ b/app/views/problems/show.ics.haml @@ -1 +1 @@ -= generate_problem_ical(problem.notices.order_by(:created_at.asc)) += generate_problem_ical(problem.notices.object.order_by(:created_at.asc)) diff --git a/spec/views/problems/show.ics.haml_spec.rb b/spec/views/problems/show.ics.haml_spec.rb index 1ae8de8..9bcfc3e 100644 --- a/spec/views/problems/show.ics.haml_spec.rb +++ b/spec/views/problems/show.ics.haml_spec.rb @@ -1,11 +1,11 @@ describe "problems/show.html.ics", type: 'view' do - let(:problem) { Fabricate(:problem) } + let(:problem) { ProblemDecorator.new(Fabricate(:problem)) } before do allow(view).to receive(:problem).and_return(problem) end - it 'should work' do + it 'works' do render :template => 'problems/show', :formats => [:ics], :handlers => [:haml] end end -- libgit2 0.21.2