Repository navigation
Commit 54c8fee
authored
test(tokens): supply accountController to SwapViewModel (#1345)
#1341 added a required `accountController` parameter to `SwapViewModel` and
changed only `SwapViewModel.kt`, so `SwapViewModelErrorTest.createViewModel()`
still calls the old constructor. The module's unit tests have not compiled
since it merged, which fails every PR built against `code/cash`.
Add the mock in constructor order and stub `observeHasAccountFor` to return
false. Nothing in this file exercises the first-buy/top-up branch it feeds, and
an explicit answer is steadier than a relaxed mock's empty flow.
`SwapViewModelStateTest` never constructs the view model, so it needs nothing.1 parent 71644f7 commit 54c8fee
1 file changed
Lines changed: 8 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
0 commit comments