File tree 2 files changed +11
-6
lines changed
src/status_im2/contexts/wallet
2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 231
231
232
232
(rf/reg-event-fx :wallet/store-last-collectible-details store-last-collectible-details)
233
233
234
- (defn clear-stored-last-collectible-details
235
- [{:keys [db]}]
236
- {:db (update db :wallet dissoc :last-collectible-details )})
237
-
238
- (rf/reg-event-fx :wallet/clear-stored-last-collectible-details clear-stored-last-collectible-details)
239
-
240
234
(rf/reg-event-fx
241
235
:wallet/request-collectibles
242
236
(fn [{:keys [db]} [{:keys [start-at-index new-request?]}]]
Original file line number Diff line number Diff line change 52
52
effects (events/clear-stored-collectibles {:db db})
53
53
result-db (:db effects)]
54
54
(is (= result-db expected-db))))))
55
+
56
+ (deftest store-last-collectible-details
57
+ (testing " store-last-collectible-details"
58
+ (let [db {:wallet {}}
59
+ last-collectible {:description " Pandaria"
60
+ :image-url " https://..." }
61
+ expected-db {:wallet {:last-collectible-details {:description " Pandaria"
62
+ :image-url " https://..." }}}
63
+ effects (events/store-last-collectible-details {:db db} last-collectible)
64
+ result-db (:db effects)]
65
+ (is (= result-db expected-db)))))
You can’t perform that action at this time.
0 commit comments