On 06/21/2011 03:22 PM, Tomas Hrcka wrote:
---
src/app/views/provider_accounts/edit.haml | 2 +-
src/features/provider_account.feature | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/app/views/provider_accounts/edit.haml
b/src/app/views/provider_accounts/edit.haml
index d1577d7..8a35dbf 100644
--- a/src/app/views/provider_accounts/edit.haml
+++ b/src/app/views/provider_accounts/edit.haml
@@ -15,5 +15,5 @@
.content
- unless @providers.empty?
- - form_for(@provider_account, :url => provider_accounts_path, :html =>
{:multipart => true}) do |f|
+ - form_for(@provider_account, :url =>
provider_account_path(@provider_account), :html => {:multipart => true,:method
=> :put}) do |f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/features/provider_account.feature
b/src/features/provider_account.feature
index 477cd16..16eae92 100644
--- a/src/features/provider_account.feature
+++ b/src/features/provider_account.feature
@@ -78,6 +78,27 @@ Feature: Manage Provider Accounts
And I should see "was deleted"
And there should be no provider accounts
+ Scenario: Edit a existing Provider Account
+ Given there is a provider named "testprovider"
+ And there is a provider account named "testaccount"
+ And I am on the provider accounts page
+ And I follow "testaccount"
+ When I follow "Edit"
+ And I fill in "provider_account[label]" with
"testaccount_updated"
+ And I press "Save"
+ Then I should see "testaccount_updated"
+ And I should see "Provider Account updated!" within ".flashes"
+
+ Scenario: Edit a existing Provider Account with invalid credentials
+ Given there is a provider named "testprovider"
+ And there is a provider account named "testaccount"
+ And I am on the provider accounts page
+ And I follow "testaccount"
+ When I follow "Edit"
+ And I fill in "provider_account[label]" with ""
+ And I press "Save"
+ Then I should see "Provider Account wasn't updated!"
+
# Scenario: Search for Provider Accounts
# Given there is a provider named "testprovider"
# And there is a provider account named "testaccount"
ACK and
pushed.