Commit 59de02bd351c64bf5a2263b96bdee8d6a05abd0d
Committed by
Gabriela Navarro
1 parent
d7a9bdd0
Exists in
master
and in
5 other branches
Remove puts from institution's helper
Signed-off-by: Parley Martins <parley@outlook.com> Signed-off-by: Rodrigo Medeiros <rodrigo.mss01@gmail.com>
Showing
2 changed files
with
2 additions
and
5 deletions
Show diff stats
lib/institution_helper.rb
@@ -12,14 +12,12 @@ module InstitutionHelper | @@ -12,14 +12,12 @@ module InstitutionHelper | ||
12 | environment = Environment.find_by_name(@web_service_info["environment_name"]) | 12 | environment = Environment.find_by_name(@web_service_info["environment_name"]) |
13 | 13 | ||
14 | if environment.nil? | 14 | if environment.nil? |
15 | - puts "\n", "="*80, "Could not find the informed environment: #{@web_service_info["environment_name"]}", "="*80, "\n" | ||
16 | return | 15 | return |
17 | end | 16 | end |
18 | 17 | ||
19 | admin = environment.people.find_by_name(@web_service_info["default_community_admin"]) | 18 | admin = environment.people.find_by_name(@web_service_info["default_community_admin"]) |
20 | 19 | ||
21 | if admin.nil? | 20 | if admin.nil? |
22 | - puts "\n", "="*80, "Could not find the informed admin: #{@web_service_info["default_community_admin"]}", "="*80, "\n" | ||
23 | return | 21 | return |
24 | end | 22 | end |
25 | 23 |
test/integration/institution_helper_test.rb
@@ -14,13 +14,12 @@ class InstitutionHelperTest < ActionController::IntegrationTest | @@ -14,13 +14,12 @@ class InstitutionHelperTest < ActionController::IntegrationTest | ||
14 | end | 14 | end |
15 | 15 | ||
16 | should "not proceed with SIORG script if environment name isn't the informed" do | 16 | should "not proceed with SIORG script if environment name isn't the informed" do |
17 | - assert !InstitutionHelper.mass_update | 17 | + assert !InstitutionHelper.mass_update, "Should not find the environment." |
18 | end | 18 | end |
19 | - | ||
20 | should "not proceed with SIORG script if admin name isn't the informed" do | 19 | should "not proceed with SIORG script if admin name isn't the informed" do |
21 | @environment.name = "Noosfero" | 20 | @environment.name = "Noosfero" |
22 | @environment.save | 21 | @environment.save |
23 | 22 | ||
24 | - assert !InstitutionHelper.mass_update | 23 | + assert !InstitutionHelper.mass_update, "Could not find the admin." |
25 | end | 24 | end |
26 | end | 25 | end |