Skip to content

Commit

Permalink
🚧
Browse files Browse the repository at this point in the history
  • Loading branch information
josemigallas committed Jul 26, 2024
1 parent b87a990 commit d681182
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion spec/acceptance/api/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
put '/admin/api/accounts/:id/make_pending.:format' do
include_context "resource"

before { resource.approve! }
before { resource.state.should_not == "pending" }

# the response code and body are checked automatically
Expand Down
9 changes: 5 additions & 4 deletions test/factories/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
end

trait :pending do
state { :rejected }
state { :pending }
end

factory :pending_account, traits: [:pending]
Expand All @@ -67,9 +67,10 @@

factory(:buyer_account, traits: [:approved], parent: :pending_buyer_account) do
association :provider_account
# after(:create) do |account|
# account.approve! if account.can_approve?
# end
after(:create) do |account|
account.approve!
account.approve!
end

after(:build) do |account|
if account.users.empty?
Expand Down

0 comments on commit d681182

Please sign in to comment.