Last active
December 22, 2015 22:39
-
-
Save calebhearth/6541077 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apps/suds/app/helpers/md_honors_helper.rb b/apps/suds/app/helpers/md_honors_helper.rb | |
index 730cdc6..f7c2a1f 100644 | |
--- a/apps/suds/app/helpers/md_honors_helper.rb | |
+++ b/apps/suds/app/helpers/md_honors_helper.rb | |
@@ -21,7 +21,7 @@ module MdHonorsHelper | |
attr_reader :view_context, :text, :email, :source, :options | |
def login_url | |
- "http://www.mdhonors.com/signin/default.aspx?source=#{source}&email=#{email_param}" | |
+ "http://www.mdhonors.com/signin/default.aspx?source=#{source}&email=#{email_param}".html_safe | |
end | |
def email_param | |
diff --git a/apps/suds/spec/helpers/md_honors_helper_spec.rb b/apps/suds/spec/helpers/md_honors_helper_spec.rb | |
index a1db29b..2209be9 100644 | |
--- a/apps/suds/spec/helpers/md_honors_helper_spec.rb | |
+++ b/apps/suds/spec/helpers/md_honors_helper_spec.rb | |
@@ -2,14 +2,14 @@ require 'spec_helper' | |
describe MdHonorsHelper do | |
- describe 'mdhonors_login_url' do | |
+ describe 'mdhonors_link_to' do | |
it 'creates an MDHonors login URL for an email address' do | |
- url = mdhonors_login_url('[email protected]') | |
- url.should == 'http://www.mdhonors.com/signin/default.aspx?source=home&email=foo%40bar.com' | |
+ link = mdhonors_link_to('foo', '[email protected]') | |
+ link.should include 'http://www.mdhonors.com/signin/default.aspx?source=home&email=foo%40bar.com' | |
end | |
it 'takes an optional source argument' do | |
- url = mdhonors_login_url('[email protected]', 'blah') | |
- url.should == 'http://www.mdhonors.com/signin/default.aspx?source=blah&email=foo%40bar.com' | |
+ link = mdhonors_link_to('foo', '[email protected]', 'blah') | |
+ link.should include 'http://www.mdhonors.com/signin/default.aspx?source=blah&email=foo%40bar.com' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment