-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Since view specs have been introduced in #316, we should now turn all the view-like specs that are implemented as controller specs, to proper view specs.
I'm talking about things like:
timeoverflow/spec/controllers/transfers_controller_spec.rb
Lines 29 to 32 in 94a4ad8
it 'finds the accountable' do | |
get :new, params | |
expect(response.body) | |
.to include("<a href=\"/members/#{member_giver.user.id}\">#{member_giver.display_name_with_uid}</a>") |
which should be turned into something similar to:
it 'links to the accountable' do
render template: 'transfers/new'
expect(rendered).to have_link(href: members_path(member))
end
You can take a look at how the first spec was implemented in https://github.com/coopdevs/timeoverflow/pull/316/files#diff-a65080f84f1f83bfbf9866ed561fa58d