From 6908d806a09b8069ac2afc6d9bc524861a9f06d2 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 22 Nov 2023 21:55:47 -0500 Subject: [PATCH] Remove controller tests --- test/controllers/.keep | 0 .../credit_card_bills_controller_test.rb | 48 ------------------- test/controllers/expenses_controller_test.rb | 48 ------------------- test/controllers/incomes_controller_test.rb | 48 ------------------- test/controllers/members_controller_test.rb | 48 ------------------- 5 files changed, 192 deletions(-) delete mode 100644 test/controllers/.keep delete mode 100644 test/controllers/credit_card_bills_controller_test.rb delete mode 100644 test/controllers/expenses_controller_test.rb delete mode 100644 test/controllers/incomes_controller_test.rb delete mode 100644 test/controllers/members_controller_test.rb diff --git a/test/controllers/.keep b/test/controllers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/controllers/credit_card_bills_controller_test.rb b/test/controllers/credit_card_bills_controller_test.rb deleted file mode 100644 index 6f4a29c..0000000 --- a/test/controllers/credit_card_bills_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "test_helper" - -class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest - setup do - @credit_card_bill = credit_card_bills(:one) - end - - test "should get index" do - get credit_card_bills_url - assert_response :success - end - - test "should get new" do - get new_credit_card_bill_url - assert_response :success - end - - test "should create credit_card_bill" do - assert_difference("CreditCardBill.count") do - post credit_card_bills_url, params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}} - end - - assert_redirected_to credit_card_bill_url(CreditCardBill.last) - end - - test "should show credit_card_bill" do - get credit_card_bill_url(@credit_card_bill) - assert_response :success - end - - test "should get edit" do - get edit_credit_card_bill_url(@credit_card_bill) - assert_response :success - end - - test "should update credit_card_bill" do - patch credit_card_bill_url(@credit_card_bill), params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}} - assert_redirected_to credit_card_bill_url(@credit_card_bill) - end - - test "should destroy credit_card_bill" do - assert_difference("CreditCardBill.count", -1) do - delete credit_card_bill_url(@credit_card_bill) - end - - assert_redirected_to credit_card_bills_url - end -end diff --git a/test/controllers/expenses_controller_test.rb b/test/controllers/expenses_controller_test.rb deleted file mode 100644 index 4a69bbb..0000000 --- a/test/controllers/expenses_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "test_helper" - -class ExpensesControllerTest < ActionDispatch::IntegrationTest - setup do - @expense = expenses(:monthly_expense) - end - - test "should get index" do - get expenses_url - assert_response :success - end - - test "should get new" do - get new_expense_url - assert_response :success - end - - test "should create expense" do - assert_difference("Expense.count") do - post expenses_url, params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}} - end - - assert_redirected_to expense_url(Expense.last) - end - - test "should show expense" do - get expense_url(@expense) - assert_response :success - end - - test "should get edit" do - get edit_expense_url(@expense) - assert_response :success - end - - test "should update expense" do - patch expense_url(@expense), params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}} - assert_redirected_to expense_url(@expense) - end - - test "should destroy expense" do - assert_difference("Expense.count", -1) do - delete expense_url(@expense) - end - - assert_redirected_to expenses_url - end -end diff --git a/test/controllers/incomes_controller_test.rb b/test/controllers/incomes_controller_test.rb deleted file mode 100644 index ced234a..0000000 --- a/test/controllers/incomes_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "test_helper" - -class IncomesControllerTest < ActionDispatch::IntegrationTest - setup do - @income = incomes(:included_1) - end - - test "should get index" do - get incomes_url - assert_response :success - end - - test "should get new" do - get new_income_url - assert_response :success - end - - test "should create income" do - assert_difference("Income.count") do - post incomes_url, params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}} - end - - assert_redirected_to income_url(Income.last) - end - - test "should show income" do - get income_url(@income) - assert_response :success - end - - test "should get edit" do - get edit_income_url(@income) - assert_response :success - end - - test "should update income" do - patch income_url(@income), params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}} - assert_redirected_to income_url(@income) - end - - test "should destroy income" do - assert_difference("Income.count", -1) do - delete income_url(@income) - end - - assert_redirected_to incomes_url - end -end diff --git a/test/controllers/members_controller_test.rb b/test/controllers/members_controller_test.rb deleted file mode 100644 index c04df44..0000000 --- a/test/controllers/members_controller_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "test_helper" - -class MembersControllerTest < ActionDispatch::IntegrationTest - setup do - @member = members(:one) - end - - test "should get index" do - get members_url - assert_response :success - end - - test "should get new" do - get new_member_url - assert_response :success - end - - test "should create member" do - assert_difference("Member.count") do - post members_url, params: {member: {name: @member.name, pays: @member.pays}} - end - - assert_redirected_to member_url(Member.last) - end - - test "should show member" do - get member_url(@member) - assert_response :success - end - - test "should get edit" do - get edit_member_url(@member) - assert_response :success - end - - test "should update member" do - patch member_url(@member), params: {member: {name: @member.name, pays: @member.pays}} - assert_redirected_to member_url(@member) - end - - test "should destroy member" do - assert_difference("Member.count", -1) do - delete member_url(@member) - end - - assert_redirected_to members_url - end -end