Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let(:solr_document) { SolrDocument.new(work.to_solr) }
- let(:presenter) { described_class.new(solr_document, ability) }
- describe 'stats_path' do
- let(:user) { 'sarah' }
- let(:ability) { double "Ability" }
- let(:work) { build(:generic_work, id: '123abc') }
- it { expect(presenter.stats_path).to eq (Sufia::Engine.routes.url_helpers.stats_work_path) }
- end
- 1) Sufia::WorkShowPresenter stats_path
- Failure/Error: it { expect(presenter.stats_path).to eq (Sufia::Engine.routes.url_helpers.stats_work_path) }
- ActionController::UrlGenerationError:
- No route matches {:action=>"work", :controller=>"stats"} missing required keys: [:id]
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/formatter.rb:46:in `generate'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:719:in `generate'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:750:in `generate'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:797:in `url_for'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:280:in `call'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:223:in `call'
- # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:345:in `block (2 levels) in define_url_helper'
- # ./spec/presenters/sufia/work_show_presenter_spec.rb:11:in `block (3 levels) in <top (required)>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement