Creating testing for twitter user in ReStore.

This commit is contained in:
ruidajo 2022-04-12 18:59:12 -05:00
parent 8f2ed277fb
commit f563f964b2
2 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@ accessing
store store
ReStore isConnected ifFalse: [ self class storeDB]. "Starting the ReStore singleton." ReStore isConnected ifFalse: [ self class storeDB]. "Starting the ReStore singleton."
self tweets do: [:each | ReStore evaluateAsTransaction: [ self tweets do: [:each | ReStore evaluateAsTransaction: [
"TO DO: each isNotInDB ->"each store. each store.
"TO DO: each user id isInDB? ifFalse: [ each user store ]" each user isInDB ifFalse: [ each user store ]
] ]
]. ].

View File

@ -0,0 +1,7 @@
accessing
isInDB
(TwitterUser storedInstances select: [ :each | each id = self id ])
ifEmpty: [ ^ false ]
ifNotEmpty: [ ^ true ].