1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Initial pass at Synth-based ticker selection (#1392)

* Initial pass at Synth-based ticker selection

* Update _tickers.turbo_stream.erb

* Functional combobox display

* A few cleanup steps

* Linter

* Prevent long strings

* Another step towards functional combobox

* Deprecated files

* Custom Combobox implementation

* Lint

* Test suite fixes

* Lint

* Make direct use of mic codes

* Update splits

* Update trades_test.rb
This commit is contained in:
Josh Pigford 2024-10-30 09:23:44 -04:00 committed by GitHub
parent 490f44589e
commit cd91e66618
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 118 additions and 232 deletions

View file

@ -97,7 +97,7 @@ class Account::TradesControllerTest < ActionDispatch::IntegrationTest
account_entry: {
type: "buy",
date: Date.current,
ticker: "NVDA",
ticker: "NVDA (NASDAQ)",
qty: 10,
price: 10
}
@ -118,7 +118,7 @@ class Account::TradesControllerTest < ActionDispatch::IntegrationTest
post account_trades_url(@entry.account), params: {
account_entry: {
type: "sell",
ticker: "AAPL",
ticker: "AAPL (NYSE)",
date: Date.current,
currency: "USD",
qty: 10,

13
test/fixtures/stock_exchanges.yml vendored Normal file
View file

@ -0,0 +1,13 @@
nasdaq:
name: NASDAQ
mic: XNAS
acronym: NASDAQ
country: USA
country_code: US
nyse:
name: New York Stock Exchange
mic: XNYS
acronym: NYSE
country: USA
country_code: US

View file

@ -9,6 +9,16 @@ class TradesTest < ApplicationSystemTestCase
@account = accounts(:investment)
visit_account_trades
Security::SynthComboboxOption.stubs(:find_in_synth).returns([
Security::SynthComboboxOption.new(
symbol: "AAPL",
name: "Apple Inc.",
logo_url: "https://logo.synthfinance.com/ticker/AAPL",
exchange_acronym: "NASDAQ",
exchange_mic: "XNAS"
)
])
end
test "can create buy transaction" do