File tree Expand file tree Collapse file tree
spec/support/shared_examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ def process!
166166 return if invalid?
167167
168168 process_import!
169+
170+ TeamCachedCounts . new ( team ) . reset_import_issues!
169171 end
170172
171173 def remove!
Original file line number Diff line number Diff line change 5757 ) . from ( nil ) . to ( today )
5858 end
5959 end
60+
61+ it "resets import issues in team cached counts" do
62+ team_cached_counts =
63+ instance_double ( TeamCachedCounts , reset_import_issues! : true )
64+
65+ allow ( TeamCachedCounts ) . to receive ( :new ) . with ( subject . team ) . and_return (
66+ team_cached_counts
67+ )
68+
69+ if subject . is_a? ( ImmunisationImport )
70+ travel_to ( today ) { subject . process! }
71+ else
72+ subject . process!
73+ end
74+
75+ expect ( TeamCachedCounts ) . to have_received ( :new ) . with ( subject . team )
76+ expect ( team_cached_counts ) . to have_received ( :reset_import_issues! )
77+ end
6078 end
6179
6280 describe "#remove!" do
You can’t perform that action at this time.
0 commit comments