test/lib/web_test.rb in sidekiq-benchmark-0.1.1 vs test/lib/web_test.rb in sidekiq-benchmark-0.1.2
- old
+ new
@@ -23,9 +23,26 @@
WorkerMock.new
get '/benchmarks'
last_response.status.must_equal 200, last_response.body
end
+
+ it "should remove benchmarks data" do
+ WorkerMock.new
+
+ Sidekiq.redis do |conn|
+ keys = conn.keys "benchmark:*"
+ keys.wont_be_empty
+ end
+
+ post '/benchmarks/remove'
+ last_response.status.must_equal 302
+
+ Sidekiq.redis do |conn|
+ keys = conn.keys "benchmark:*"
+ keys.must_be_empty
+ end
+ end
end
end
end
end