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 2a22cf3 commit 62383cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/status_im/subs/wallet/activities_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
(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
{:wallet/all-activities [{:sender "acc1" :recipient "acc2" :timestamp 1588291200}
{:sender "acc2" :recipient "acc1" :timestamp 1588377600}
{:sender "acc3" :recipient "acc4" :timestamp 1588464000}]
:wallet/current-viewing-account-address "acc1"})
(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")))
(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 62383cf

Please sign in to comment.