Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed May 8, 2024
1 parent 62383cf commit 8223986
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/status_im/subs/wallet/activities_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
(h/deftest-sub :wallet/activities-for-current-viewing-account
[sub-name]
(testing "Return activities filtered and grouped by account and dates"
(swap!
(-> rf-db/app-db
(assoc-in [:wallet :activities]
[{:sender "acc1" :recipient "acc2" :timestamp 1588291200}
{:sender "acc2" :recipient "acc1" :timestamp 1588377600}
{:sender "acc3" :recipient "acc4" :timestamp 1588464000}])
(assoc-in [:wallet :current-viewing-account-address] "acc1")))
(swap! rf-db/app-db
(fn [db]
(-> db
(assoc-in [:wallet :activities]
[{:sender "acc1" :recipient "acc2" :timestamp 1588291200}
{:sender "acc2" :recipient "acc1" :timestamp 1588377600}
{:sender "acc3" :recipient "acc4" :timestamp 1588464000}])
(assoc-in [:wallet :current-viewing-account-address] "acc1"))))
(is (= [{:title "May 1" :data [{:sender "acc1" :recipient "acc2" :timestamp 1588291200}]}
{:title "May 2" :data [{:sender "acc2" :recipient "acc1" :timestamp 1588377600}]}]
(rf/sub [sub-name])))))

0 comments on commit 8223986

Please sign in to comment.