aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/request/_hidden_correspondence.html.erb7
-rw-r--r--spec/integration/view_request_spec.rb16
2 files changed, 16 insertions, 7 deletions
diff --git a/app/views/request/_hidden_correspondence.html.erb b/app/views/request/_hidden_correspondence.html.erb
index 1deed6735..153164278 100644
--- a/app/views/request/_hidden_correspondence.html.erb
+++ b/app/views/request/_hidden_correspondence.html.erb
@@ -1,8 +1,11 @@
<p id="hidden_message">
<%- if !message.prominence_reason.blank? %>
- <%= _('This message has been hidden. {{reason}} Please <a href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe, :reason => message.prominence_reason) %>
+ <%= _('This message has been hidden.') %>
+ <%= message.prominence_reason %>
+ <%= _('Please <a href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe) %>
<%- else %>
- <%= _('This message has been hidden. There are various reasons why we might have done this, sorry we can\'t be more specific here. Please <a href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe) %>
+ <%= _("This message has been hidden. There are various reasons why we might have done this, sorry we can't be more specific here.") %>
+ <%= _('Please <a href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe) %>
<%- end %>
<% if message.prominence == 'requester_only' %>
<%= _('If you are the requester, then you may <a href="{{url}}">sign in</a> to view the message.', :url => signin_url(:r => request.fullpath).html_safe) %>
diff --git a/spec/integration/view_request_spec.rb b/spec/integration/view_request_spec.rb
index f8be4a938..2de961200 100644
--- a/spec/integration/view_request_spec.rb
+++ b/spec/integration/view_request_spec.rb
@@ -69,14 +69,16 @@ describe "When viewing requests" do
# unregistered
unregistered = without_login
unregistered.browses_request('why_do_you_have_such_a_fancy_dog')
- unregistered.response.body.should include("This message has been hidden. It is too irritating.")
+ unregistered.response.body.should include("This message has been hidden.")
+ unregistered.response.body.should include("It is too irritating.")
unregistered.response.body.should_not include("sign in</a> to view the message.")
unregistered.response.body.should_not include("No way!")
# requester
bob = login(:bob_smith_user)
bob.browses_request('why_do_you_have_such_a_fancy_dog')
- bob.response.body.should include("This message has been hidden. It is too irritating")
+ bob.response.body.should include("This message has been hidden.")
+ bob.response.body.should include("It is too irritating")
bob.response.body.should_not include("No way!")
# admin
@@ -84,7 +86,9 @@ describe "When viewing requests" do
admin_user = login(:admin_user)
admin_user.browses_request('why_do_you_have_such_a_fancy_dog')
admin_user.response.body.should include('No way!')
- admin_user.response.body.should include("This message has prominence \'hidden\'. It is too irritating. You can only see it because you are logged in as a super user.")
+ admin_user.response.body.should include("This message has prominence \'hidden\'.")
+ admin_user.response.body.should include("It is too irritating.")
+ admin_user.response.body.should include("You can only see it because you are logged in as a super user.")
end
@@ -105,7 +109,8 @@ describe "When viewing requests" do
# unregistered
unregistered = without_login
unregistered.browses_request('why_do_you_have_such_a_fancy_dog')
- unregistered.response.body.should include("This message has been hidden. It is too irritating")
+ unregistered.response.body.should include("This message has been hidden.")
+ unregistered.response.body.should include("It is too irritating")
unregistered.response.body.should include("sign in</a> to view the message.")
unregistered.response.body.should_not include("No way!")
@@ -113,7 +118,8 @@ describe "When viewing requests" do
bob = login(:bob_smith_user)
bob.browses_request('why_do_you_have_such_a_fancy_dog')
bob.response.body.should include("No way!")
- bob.response.body.should include("This message is hidden, so that only you, the requester, can see it. It is too irritating.")
+ bob.response.body.should include("This message is hidden, so that only you, the requester, can see it.")
+ bob.response.body.should include("It is too irritating.")
# admin
confirm(:admin_user)