Skip to content

Move some controller specs to view specs #317

Open
@sauloperez

Description

@sauloperez

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions