Skip to content

Commit dac6901

Browse files
committed
tests that cache is written after a successful fetch
1 parent a56f428 commit dac6901

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/requests/weather_controller_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
expect(assigns(:daily_forecast)).to eq(fetcher_result[:daily])
4242
expect(assigns(:from_cache)).to be_falsey
4343
expect(assigns(:error)).to be_nil
44+
expect(Rails.cache.read("weather-fetcher-#{address.parameterize}")).to eq(fetcher_result)
4445
end
4546

4647
it "reads result from cache if present" do

0 commit comments

Comments
 (0)