[PATCH conductor 1/2] Adjusts RSpec tests depending on outdated strings

Matt Wagner matt.wagner at redhat.com
Fri Aug 17 17:58:37 UTC 2012


---
 .../api/provider_images_controller_spec.rb         |    2 +-
 .../controllers/config_servers_controller_spec.rb  |   10 +++++-----
 .../controllers/deployables_controller_spec.rb     |    2 +-
 src/spec/controllers/pools_controller_spec.rb      |    2 +-
 .../provider_accounts_controller_spec.rb           |    2 +-
 src/spec/models/config_server_spec.rb              |    2 +-
 src/spec/models/instance_spec.rb                   |    4 ++--
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/spec/controllers/api/provider_images_controller_spec.rb b/src/spec/controllers/api/provider_images_controller_spec.rb
index 51a2e9a..9e6f75e 100644
--- a/src/spec/controllers/api/provider_images_controller_spec.rb
+++ b/src/spec/controllers/api/provider_images_controller_spec.rb
@@ -255,7 +255,7 @@ describe Api::ProviderImagesController do
             it "should have error" do
               resp = Hash.from_xml(response.body)
               resp['error']['code'].should == "InsufficientParametersSupplied"
-              resp['error']['message'].should == "No provider account given"
+              resp['error']['message'].should == "No Provider Account given"
             end
           end
         end
diff --git a/src/spec/controllers/config_servers_controller_spec.rb b/src/spec/controllers/config_servers_controller_spec.rb
index 65d5de0..d9c3161 100644
--- a/src/spec/controllers/config_servers_controller_spec.rb
+++ b/src/spec/controllers/config_servers_controller_spec.rb
@@ -88,7 +88,7 @@ describe ConfigServersController do
         }
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "The config server information is invalid."
+      request.flash[:error].should == "The config Server information is invalid."
     end
 
     it "should fail creating a config server when the endpoint is invalid" do
@@ -103,7 +103,7 @@ describe ConfigServersController do
         }
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "The config server information is invalid."
+      request.flash[:error].should == "The config Server information is invalid."
     end
 
     it "should require that endpoint is provided" do
@@ -116,7 +116,7 @@ describe ConfigServersController do
         }
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "The config server information is invalid."
+      request.flash[:error].should == "The config Server information is invalid."
     end
 
     it "should require that key is provided" do
@@ -129,7 +129,7 @@ describe ConfigServersController do
         }
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "The config server information is invalid."
+      request.flash[:error].should == "The config Server information is invalid."
     end
 
     it "should require that secret is provided" do
@@ -142,7 +142,7 @@ describe ConfigServersController do
         }
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "The config server information is invalid."
+      request.flash[:error].should == "The config Server information is invalid."
     end
   end
 end
diff --git a/src/spec/controllers/deployables_controller_spec.rb b/src/spec/controllers/deployables_controller_spec.rb
index e952dbf..49546d8 100644
--- a/src/spec/controllers/deployables_controller_spec.rb
+++ b/src/spec/controllers/deployables_controller_spec.rb
@@ -49,7 +49,7 @@ describe DeployablesController do
         Catalog.stub(:list_for_user).and_return(Catalog.includes(:pool).where("1=0"))
         HardwareProfile.stub(:list_for_user).and_return([mock(HardwareProfile)])
         get :new, :create_from_image => @image.id
-        flash[:error].should eql(["No catalog exists! Please create one."])
+        flash[:error].should eql(["No Catalog exists. Please create one."])
       end
     end
   end
diff --git a/src/spec/controllers/pools_controller_spec.rb b/src/spec/controllers/pools_controller_spec.rb
index 87cdcdb..c61ebcd 100644
--- a/src/spec/controllers/pools_controller_spec.rb
+++ b/src/spec/controllers/pools_controller_spec.rb
@@ -286,7 +286,7 @@ describe PoolsController do
         response.should have_content_type("application/xml")
         response.body.should be_xml
         xml = Nokogiri::XML(response.body)
-        xml.xpath("/error/message").text.should == "The default pool cannot be deleted"
+        xml.xpath("/error/message").text.should == "The default Pool cannot be deleted"
       end
     end
   end
diff --git a/src/spec/controllers/provider_accounts_controller_spec.rb b/src/spec/controllers/provider_accounts_controller_spec.rb
index 10327eb..8b9fc97 100644
--- a/src/spec/controllers/provider_accounts_controller_spec.rb
+++ b/src/spec/controllers/provider_accounts_controller_spec.rb
@@ -48,7 +48,7 @@ describe ProviderAccountsController do
       post :create, :provider_account => {:provider_id => @provider.id, :credentials_hash => {}}, :provider_id => @provider.id
       response.should be_success
       response.should render_template("new")
-      request.flash[:error].should == "Cannot add the provider account."
+      request.flash[:error].should == "Cannot add the Provider account."
     end
 
     it "should permit users with account modify permission to access edit cloud account interface" do
diff --git a/src/spec/models/config_server_spec.rb b/src/spec/models/config_server_spec.rb
index 68916df..1b6bd0a 100644
--- a/src/spec/models/config_server_spec.rb
+++ b/src/spec/models/config_server_spec.rb
@@ -47,7 +47,7 @@ describe ConfigServer do
 
     it "should report an error when unauthorized" do
       @config_server.should_not be_valid
-      @config_server.errors.full_messages.join(" ").should include("Could not validate config server connection")
+      @config_server.errors.full_messages.join(" ").should include("Could not validate Config Server connection")
     end
   end
 end
diff --git a/src/spec/models/instance_spec.rb b/src/spec/models/instance_spec.rb
index 87dd77d..44d76be 100644
--- a/src/spec/models/instance_spec.rb
+++ b/src/spec/models/instance_spec.rb
@@ -309,7 +309,7 @@ describe Instance do
     pf = instance.pool.pool_family
     pf.provider_accounts = [FactoryGirl.create(:disabled_provider_account)]
     errors = instance.matches.last
-    errors.find {|e| e =~ /provider must be enabled/}.should_not be_nil
+    errors.find {|e| e =~ /provider must be enabled/i}.should_not be_nil
   end
 
   it "should not be launchable if its pool is disabled" do
@@ -374,6 +374,6 @@ describe Instance do
     matches, errors = @instance.matches
     matches.should be_empty
     errors.should_not be_empty
-    errors.select {|e| e.include?("no config server available") }.should_not be_empty
+    errors.select {|e| e.include?("no Config Server available") }.should_not be_empty
   end
 end
-- 
1.7.7.6




More information about the aeolus-devel mailing list