email-spec icon indicating copy to clipboard operation
email-spec copied to clipboard

Problem by relative path access

Open maedana opened this issue 16 years ago • 4 comments

I want you no access by relativity URL it, and to make it to the access with URL absolutely. Described in mails in my application following URL

http://username.example.com/

A necessary key(username) cannot be acquired in relativity URL though username is made a key and data is retrieved.

I've forked and added a fix at maedana@ac1ea0ecb80ca6604b3520fe7b695708adcf671a.

maedana avatar Sep 01 '09 01:09 maedana

Why do you need to do a URI::parse(url)? Could it not just use the URL? I understand your reasoning behind this. However, I wonder if other people would expect/want the relative path or if the absolute is always a fine option. Thoughts?

bmabey avatar Sep 08 '09 04:09 bmabey

I just hit this problem in a test where my user clicks a link to Paypal - the idea is to verify that the payload encryption works & they see some sensible text displayed on the Paypal page after they arrive. It's a selenium test (capybara @javascript) but using the email-helper steps it just goes to localhost instead of actually visiting the URL I clicked.

I think it'd be good for this to be an option in the helper (the default step definitions probably shouldn't change) so we can write e.g.

visit_in_email(link, :drop_link_host => false)

and the same option for click_first_link_in_email.

nruth avatar Jul 09 '10 21:07 nruth

I like the idea of making it an option and having the default option be relative since I bet the majority of users operate in that context. This would mean that you would need to create a custom step_definition, assuming you are using Cucumber. Does that sound okay to you?

bmabey avatar Jul 10 '10 02:07 bmabey

Sure.

I think an advantage of adding the option is people will notice it in the rdoc and go "aha, so that's why my test isn't working, and I'm not doing something totally crazy".

Mentioning it in the readme or wiki might be nice too.

Thanks Nick

nruth avatar Jul 10 '10 04:07 nruth