mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Add Live Data to Account Page (#464)
* Add trends, time series, seed data * Remove test data * Replace old view values with helpers * Fix tooltip bugs in D3 chart * Fix tests * Fix smoke test * Add CRUD actions for valuations * Scaffold out inline editing with Turbo
This commit is contained in:
parent
298b50a909
commit
b5b2d335fd
28 changed files with 512 additions and 167 deletions
19
test/controllers/valuations_controller_test.rb
Normal file
19
test/controllers/valuations_controller_test.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require "test_helper"
|
||||
|
||||
class ValuationsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in @user = users(:bob)
|
||||
@account = accounts(:dylan_checking)
|
||||
end
|
||||
|
||||
test "new" do
|
||||
get new_account_valuation_url(@account)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "create" do
|
||||
assert_difference("Valuation.count") do
|
||||
post account_valuations_url(@account), params: { valuation: { value: 1, date: Date.current, type: "Appraisal" } }
|
||||
end
|
||||
end
|
||||
end
|
13
test/fixtures/valuations.yml
vendored
Normal file
13
test/fixtures/valuations.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
type: "Appraisal"
|
||||
value: 9.99
|
||||
date: 2024-02-15
|
||||
account: dylan_checking
|
||||
|
||||
two:
|
||||
type: "Appraisal"
|
||||
value: 9.99
|
||||
date: 2024-02-15
|
||||
account: richards_savings
|
7
test/models/valuation_test.rb
Normal file
7
test/models/valuation_test.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class ValuationTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue