diff options
-rw-r--r-- | app/views/comment/new.rhtml | 4 | ||||
-rw-r--r-- | spec/controllers/comment_controller_spec.rb | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/app/views/comment/new.rhtml b/app/views/comment/new.rhtml index 55155c8a2..aa5b6051c 100644 --- a/app/views/comment/new.rhtml +++ b/app/views/comment/new.rhtml @@ -33,7 +33,7 @@ <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> <li><%= _(' <strong>Summarise</strong> the content of any information returned. ')%></li> <li><%= _(' Say how you\'ve <strong>used the information</strong>, with links if possible.')%> </li> - <li> <%= _('<strong>Thank</strong> the public authority or ')%><%=h @info_request.user.name %>. </li> + <li> <%= _('<strong>Thank</strong> the public authority or ')%><%=h (@info_request.user_name ? @info_request.user_name : _('the requester')) %>. </li> <% end %> <% if [ 'partially_successful' ].include?(@info_request.described_state) %> <li> <%= _('Suggest how the requester can find the <strong>rest of the information</strong>.')%></li> @@ -67,7 +67,7 @@ </ul> <p> - <big><%= _('Annotations will be posted publicly here, and are + <big><%= _('Annotations will be posted publicly here, and are <strong>not</strong> sent to {{public_body_name}}.',:public_body_name=>h(@info_request.public_body.name)) %></big> <% if @info_request.is_external? %> <big><%= _('Note that the requester will not be notified about your annotation, because the request was published by {{public_body_name}} on their behalf.', :public_body_name => @info_request.public_body.name) %></big> diff --git a/spec/controllers/comment_controller_spec.rb b/spec/controllers/comment_controller_spec.rb index 93752537c..b71bc0aea 100644 --- a/spec/controllers/comment_controller_spec.rb +++ b/spec/controllers/comment_controller_spec.rb @@ -54,6 +54,26 @@ describe CommentController, "when commenting on a request" do response.should render_template('new') end + describe 'when commenting on an external request' do + + describe 'when responding to a GET request on a successful request' do + + before do + @external_request = info_requests(:external_request) + @external_request.described_state = 'successful' + @external_request.save! + end + + it 'should be successful' do + get :new, :url_title => @external_request.url_title, + :type => 'request' + response.should be_success + end + + end + + end + end |