Remove isolated useless assignments
These variables can be considered a block, and so removing them doesn't make the test much harder to undestand. Sometimes these variables formed the setup, sometimes they formed an isolated part of the setup, and sometimes they were the part of the test that made the test different from other tests.
This commit is contained in:
@@ -64,9 +64,9 @@ describe Admin::Api::StatsController do
|
||||
time_1 = Time.zone.local(2017, 04, 01)
|
||||
time_2 = Time.zone.local(2017, 04, 02)
|
||||
|
||||
budget_investment1 = create(:budget_investment, created_at: time_1)
|
||||
budget_investment2 = create(:budget_investment, created_at: time_2)
|
||||
budget_investment3 = create(:budget_investment, created_at: time_2)
|
||||
create(:budget_investment, created_at: time_1)
|
||||
create(:budget_investment, created_at: time_2)
|
||||
create(:budget_investment, created_at: time_2)
|
||||
|
||||
sign_in user
|
||||
get :show, params: { budget_investments: true }
|
||||
|
||||
Reference in New Issue
Block a user