mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Account namespace updates: part 4 (transfers, singular namespacing) (#896)
* Move Transfer to Account namespace * Fix partial resolution due to namespacing plurality * Make category and tag controllers consistent with namespacing convention * Update stale partial reference
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
require "test_helper"
|
||||
|
||||
class TransfersControllerTest < ActionDispatch::IntegrationTest
|
||||
class Account::TransfersControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in users(:family_admin)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_transfer_url
|
||||
get new_account_transfer_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "can create transfers" do
|
||||
assert_difference "Transfer.count", 1 do
|
||||
post transfers_url, params: {
|
||||
transfer: {
|
||||
assert_difference "Account::Transfer.count", 1 do
|
||||
post account_transfers_url, params: {
|
||||
account_transfer: {
|
||||
from_account_id: accounts(:checking).id,
|
||||
to_account_id: accounts(:savings).id,
|
||||
date: Date.current,
|
||||
@@ -26,8 +26,8 @@ class TransfersControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "can destroy transfer" do
|
||||
assert_difference -> { Transfer.count } => -1, -> { Transaction.count } => 0 do
|
||||
delete transfer_url(transfers(:credit_card_payment))
|
||||
assert_difference -> { Account::Transfer.count } => -1, -> { Transaction.count } => 0 do
|
||||
delete account_transfer_url(account_transfers(:credit_card_payment))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
require "test_helper"
|
||||
|
||||
class Categories::DeletionsControllerTest < ActionDispatch::IntegrationTest
|
||||
class Category::DeletionsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in users(:family_admin)
|
||||
@category = categories(:food_and_drink)
|
||||
@@ -1,6 +1,6 @@
|
||||
require "test_helper"
|
||||
|
||||
class Tags::DeletionsControllerTest < ActionDispatch::IntegrationTest
|
||||
class Tag::DeletionsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in @user = users(:family_admin)
|
||||
@user_tags = @user.family.tags
|
||||
Reference in New Issue
Block a user