It's best to actually follow the link. It's a critical part of the email.
It's a bad thing to route around the links in emails like how you are
suggesting. Thanks for bringing it up


On Fri, Nov 1, 2013 at 12:57 PM, john irving <notifications@github.com>wrote:

> In features/step_definitions/announcements_steps.rb:
>
> > @@ -22,3 +22,18 @@
> >  Then /^I should not see the announcement$/ do
> >    page.should_not have_content 'I am an announcement'
> >  end
> > +
> > +And (/^I recieve an email with an invitation link$/) do
> > +  open_email("furry@example.com")
> > +  @invitation = Invitation.find_by_recipient_email("furry@example.com")
> > +  current_email.should have_content(invitation_path(@invitation))
> > +end
> > +
> > +When(/^I click the link in the group setup email$/) do
> > +  open_email("furry@example.com")
> > +  @invitation = Invitation.find_by_recipient_email("furry@example.com")
> > +  current_email.should have_content(invitation_path(@
> invitation))
> > +  link = links_in_email(current_email)[2]
>
> this method for finding the email to click is a bit fragile and could
> cause failures if there is redesign of emails (likely)
>
> I think perhaps given you've checked on line 29 that the link is present
> that you could just straight up visit that location
>
> When(/^I click the link in the group setup email$/) do
>
>   visit invitation_path(@invitation)end
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/loomio/loomio/pull/1136/files#r7360497>
> .
>