0
@@ -4,6 +4,7 @@ describe PersonMailer do
0
@preferences = preferences(:one)
0
+ @server = @preferences.server_name
0
describe "password reminder" do
0
@@ -13,7 +14,7 @@ describe PersonMailer do
0
it "should have the right sender" do
0
- @email.from.first.should == "password-reminder@
example.com"
0
+ @email.from.first.should == "password-reminder@
#{@server}"
0
it "should have the right recipient" do
0
@@ -32,7 +33,7 @@ describe PersonMailer do
0
it "should have the right sender" do
0
- @email.from.first.should == "message@
example.com"
0
+ @email.from.first.should == "message@
#{@server}"
0
it "should have the right recipient" do
0
@@ -40,7 +41,7 @@ describe PersonMailer do
0
it "should have the right domain in the body" do
0
- @email.body.should =~ /#{@
preferences.domain}/
0
+ @email.body.should =~ /#{@
server}/
0
@@ -62,16 +63,17 @@ describe PersonMailer do
0
it "should have a URL to the connection" do
0
- url = "http://#{@
preferences.domain}/connections/#{@connection.id}/edit"
0
+ url = "http://#{@
server}/connections/#{@connection.id}/edit"
0
@email.body.should =~ /#{url}/
0
it "should have the right domain in the body" do
0
- @email.body.should =~ /#{@
preferences.domain}/
0
+ @email.body.should =~ /#{@
server}/
0
it "should have a link to the recipient's preferences" do
0
- prefs_url = "#{@preferences.domain}/people/#{@contact.to_param}/edit"
0
+ prefs_url = "http://#{@server}"
0
+ prefs_url += "/people/#{@contact.to_param}/edit"
0
@email.body.should =~ /#{prefs_url}/
0
@@ -94,14 +96,15 @@ describe PersonMailer do
0
it "should have a link to the comment" do
0
- url = "http://#{@
preferences.domain}"
0
+ url = "http://#{@
server}"
0
url += "/blogs/#{@comment.commentable.blog.to_param}"
0
url += "/posts/#{@comment.commentable.to_param}"
0
@email.body.should =~ /#{url}/
0
it "should have a link to the recipient's preferences" do
0
- prefs_url = "#{@preferences.domain}/people/#{@recipient.to_param}/edit"
0
+ prefs_url = "http://#{@server}/people/"
0
+ prefs_url += "#{@recipient.to_param}/edit"
0
@email.body.should =~ /#{prefs_url}/
0
@@ -124,13 +127,13 @@ describe PersonMailer do
0
it "should have a link to the comment" do
0
- url = "http://#{@
preferences.domain}"
0
+ url = "http://#{@
server}"
0
url += "/people/#{@comment.commentable.to_param}#wall"
0
@email.body.should =~ /#{url}/
0
it "should have a link to the recipient's preferences" do
0
- prefs_url = "#{@
preferences.domain}/people/#{@recipient.to_param}/edit"
0
+ prefs_url = "#{@
server}/people/#{@recipient.to_param}/edit"
0
@email.body.should =~ /#{prefs_url}/
0
@@ -147,12 +150,12 @@ describe PersonMailer do
0
it "should have a URL to the verification page" do
0
- url = "
/people/verify/#{@ev.code}"
0
+ url = "
http://#{@server}/people/verify/#{@ev.code}"
0
@email.body.should =~ /#{url}/
0
it "should have the right server name in the body" do
0
- @email.body.should =~ /#{@
preferences.server_name}/
0
+ @email.body.should =~ /#{@
server}/
0
\ No newline at end of file
Comments
No one has commented yet.