mtaylor(a)redhat.com writes:
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/app/views/provider_accounts/_detail.xml.haml | 2 +-
src/spec/requests/api/provider_accounts_spec.rb | 16 ++++++++--------
.../shared_examples_for_provider_accounts_api.rb | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/app/views/provider_accounts/_detail.xml.haml
b/src/app/views/provider_accounts/_detail.xml.haml
index 9b2688d..df5ba10 100644
--- a/src/app/views/provider_accounts/_detail.xml.haml
+++ b/src/app/views/provider_accounts/_detail.xml.haml
@@ -2,7 +2,7 @@
-unless local_assigns[:minimal]
-provider = provider_account.provider
-provider_type = provider.provider_type
- %label= provider_account.name
+ %name= provider_account.name
%provider{:id => provider.id, :href => api_provider_url(provider)}=
provider.name
%provider_type= provider_type.deltacloud_driver
-if local_assigns[:with_credentials]
diff --git a/src/spec/requests/api/provider_accounts_spec.rb
b/src/spec/requests/api/provider_accounts_spec.rb
index 4c64e7e..adc985e 100644
--- a/src/spec/requests/api/provider_accounts_spec.rb
+++ b/src/spec/requests/api/provider_accounts_spec.rb
@@ -37,8 +37,8 @@ describe "ProviderAccounts" do
subject { Nokogiri::XML(response.body) }
it "should have correct nodes" do
subject.xpath('//provider_account').size.should be_eql(1)
- subject.xpath('//provider_account/label').size.should be_eql(1)
- subject.xpath('//provider_account/label').text.should
be_eql("mockaccount")
+ subject.xpath('//provider_account/name').size.should be_eql(1)
+ subject.xpath('//provider_account/name').text.should
be_eql("mockaccount")
subject.xpath('//provider_account/credentials').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').text.should
be_eql("mockuser")
@@ -72,8 +72,8 @@ describe "ProviderAccounts" do
subject { Nokogiri::XML(response.body) }
it "should have correct nodes" do
subject.xpath('//provider_account').size.should be_eql(1)
- subject.xpath('//provider_account/label').size.should be_eql(1)
- subject.xpath('//provider_account/label').text.should
be_eql("ec2account")
+ subject.xpath('//provider_account/name').size.should be_eql(1)
+ subject.xpath('//provider_account/name').text.should
be_eql("ec2account")
subject.xpath('//provider_account/credentials').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').text.should
be_eql("ec2user")
@@ -156,8 +156,8 @@ describe "ProviderAccounts" do
subject { Nokogiri::XML(response.body) }
it "should have correct nodes" do
subject.xpath('//provider_account').size.should be_eql(1)
- subject.xpath('//provider_account/label').size.should be_eql(1)
- subject.xpath('//provider_account/label').text.should
be_eql("mockaccount")
+ subject.xpath('//provider_account/name').size.should be_eql(1)
+ subject.xpath('//provider_account/name').text.should
be_eql("mockaccount")
subject.xpath('//provider_account/credentials').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').size.should be_eql(1)
subject.xpath('//provider_account/credentials/username').text.should
be_eql("mockuser")
@@ -192,8 +192,8 @@ describe "ProviderAccounts" do
subject { Nokogiri::XML(response.body) }
it "should have correct nodes" do
subject.xpath('//provider_account').size.should be_eql(1)
- subject.xpath('//provider_account/label').size.should be_eql(1)
- subject.xpath('//provider_account/label').text.should
be_eql("ec2account")
+ subject.xpath('//provider_account/name').size.should be_eql(1)
+ subject.xpath('//provider_account/name').text.should
be_eql("ec2account")
subject.xpath('//provider_account/credentials').size.should
be_eql(1)
subject.xpath('//provider_account/credentials/username').size.should be_eql(1)
subject.xpath('//provider_account/credentials/username').text.should
be_eql("ec2user")
diff --git a/src/spec/support/shared_examples_for_provider_accounts_api.rb
b/src/spec/support/shared_examples_for_provider_accounts_api.rb
index 9fbc9e6..1bf7e8a 100644
--- a/src/spec/support/shared_examples_for_provider_accounts_api.rb
+++ b/src/spec/support/shared_examples_for_provider_accounts_api.rb
@@ -13,7 +13,7 @@ shared_examples_for "having XML with provider accounts" do
xml_provider_account.xpath('(a)href').text.should
be_eql(api_provider_account_url(provider_account))
# xml_provider_account.xpath('label').text.should
be_eql(provider_account.name.to_s)
- %w{label provider provider_type}.each do |element|
+ %w{name provider provider_type}.each do |element|
xml_provider_account.xpath(element).should_not be_empty
end
--
1.7.6.4
ACK and pushed to both