Commit 94715b97632ce3e7c28a90f275ef646fc4f0c256

Authored by woutersioen
1 parent cbd6c501
Exists in master and in 1 other branch production

make errs vs errors more consistent.

Also: fix tests.
app/controllers/problems_controller.rb
@@ -78,7 +78,7 @@ class ProblemsController < ApplicationController @@ -78,7 +78,7 @@ class ProblemsController < ApplicationController
78 78
79 def resolve 79 def resolve
80 problem.resolve! 80 problem.resolve!
81 - flash[:success] = 'Great news everyone! The err has been resolved.' 81 + flash[:success] = 'Great news everyone! The error has been resolved.'
82 redirect_to :back 82 redirect_to :back
83 rescue ActionController::RedirectBackError 83 rescue ActionController::RedirectBackError
84 redirect_to app_path(app) 84 redirect_to app_path(app)
app/views/mailer/comment_notification.html.haml
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 %span.bold= @problem.environment 13 %span.bold= @problem.environment
14 environment. 14 environment.
15 %br 15 %br
16 - This err has occurred #{pluralize @problem.notices_count, 'time'}. 16 + This error has occurred #{pluralize @problem.notices_count, 'time'}.
17 %p 17 %p
18 = link_to("Click here to view the error and add a comment on Errbit", app_problem_url(@app, @problem), :class => "bold") << "." 18 = link_to("Click here to view the error and add a comment on Errbit", app_problem_url(@app, @problem), :class => "bold") << "."
19 19
app/views/mailer/comment_notification.text.erb
1 <%= @user.name %> has just commented on an error that occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> 1 <%= @user.name %> has just commented on an error that occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %>
2 2
3 -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: 3 +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here:
4 4
5 <%= app_problem_url(@app, @notice.problem) %> 5 <%= app_problem_url(@app, @notice.problem) %>
6 6
app/views/mailer/err_notification.html.haml
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 %td.content(valign="top") 6 %td.content(valign="top")
7 %div 7 %div
8 %p 8 %p
9 - An err has just occurred in 9 + An error has just occurred in
10 = link_to(@app.name, app_url(@app), :class => "bold") << "," 10 = link_to(@app.name, app_url(@app), :class => "bold") << ","
11 on the 11 on the
12 %span.bold= @notice.environment_name 12 %span.bold= @notice.environment_name
13 environment. 13 environment.
14 %br 14 %br
15 - This err has occurred #{pluralize @notice.problem.notices_count, 'time'}. 15 + This error has occurred #{pluralize @notice.problem.notices_count, 'time'}.
16 %p 16 %p
17 = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "." 17 = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "."
18 %tr 18 %tr
app/views/mailer/err_notification.text.erb
1 -An err has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> 1 +An error has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %>
2 2
3 -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: 3 +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here:
4 4
5 <%= app_problem_url(@app, @notice.problem) %> 5 <%= app_problem_url(@app, @notice.problem) %>
6 6
spec/controllers/problems_controller_spec.rb
@@ -405,12 +405,12 @@ describe ProblemsController, type: &#39;controller&#39; do @@ -405,12 +405,12 @@ describe ProblemsController, type: &#39;controller&#39; do
405 405
406 it "should display a message about 1 err" do 406 it "should display a message about 1 err" do
407 post :resolve_several, :problems => [@problem2.id.to_s] 407 post :resolve_several, :problems => [@problem2.id.to_s]
408 - expect(flash[:success]).to match(/1 err has been resolved/) 408 + expect(flash[:success]).to match(/1 error has been resolved/)
409 end 409 end
410 410
411 it "should display a message about 2 errs" do 411 it "should display a message about 2 errs" do
412 post :resolve_several, :problems => [@problem1.id.to_s, @problem2.id.to_s] 412 post :resolve_several, :problems => [@problem1.id.to_s, @problem2.id.to_s]
413 - expect(flash[:success]).to match(/2 errs have been resolved/) 413 + expect(flash[:success]).to match(/2 errors have been resolved/)
414 expect(controller.selected_problems).to eq [@problem1, @problem2] 414 expect(controller.selected_problems).to eq [@problem1, @problem2]
415 end 415 end
416 end 416 end
spec/mailers/mailer_spec.rb
@@ -92,7 +92,7 @@ describe Mailer do @@ -92,7 +92,7 @@ describe Mailer do
92 end 92 end
93 93
94 it "should have the notices count in the body" do 94 it "should have the notices count in the body" do
95 - expect(@email).to have_body_text("This err has occurred 2 times") 95 + expect(@email).to have_body_text("This error has occurred 2 times")
96 end 96 end
97 97
98 it "should have the comment body" do 98 it "should have the comment body" do
spec/views/apps/show.html.haml_spec.rb
@@ -17,14 +17,14 @@ describe &quot;apps/show.html.haml&quot;, type: &#39;view&#39; do @@ -17,14 +17,14 @@ describe &quot;apps/show.html.haml&quot;, type: &#39;view&#39; do
17 it "should confirm the 'cancel' link" do 17 it "should confirm the 'cancel' link" do
18 render 18 render
19 19
20 - expect(action_bar).to have_selector('a.button', :text => 'all errs') 20 + expect(action_bar).to have_selector('a.button', :text => 'all errors')
21 end 21 end
22 end 22 end
23 23
24 context "without errs" do 24 context "without errs" do
25 it 'see no errs' do 25 it 'see no errs' do
26 render 26 render
27 - expect(rendered).to match(/No errs have been/) 27 + expect(rendered).to match(/No errors have been/)
28 end 28 end
29 end 29 end
30 30