Commit c2265050 by Kevin Chugh

add sleep to prevent tests artificially failing

parent 1f59831e
......@@ -48,6 +48,8 @@ describe "app" do
start_time = Date.today - 400.days
end_time = Time.now
sleep 1
post "/api/v1/notifications", from: CGI::escape(start_time.to_s), to: CGI::escape(end_time.to_s), user_ids: user.id
last_response.should be_ok
payload = JSON.parse last_response.body
......@@ -70,6 +72,9 @@ describe "app" do
start_time = Date.today - 400.days
end_time = Time.now
user = User.find Subscription.first.subscriber_id
sleep 1
post "/api/v1/notifications", from: CGI::escape(start_time.to_s), to: CGI::escape(end_time.to_s), user_ids: user.id
last_response.should be_ok
payload = JSON.parse last_response.body
......@@ -84,6 +89,8 @@ describe "app" do
thread = CommentThread.find thread_ids.first
thread.historical_abuse_flaggers << ["1"]
sleep 1
post "/api/v1/notifications", from: CGI::escape(start_time.to_s), to: CGI::escape(end_time.to_s), user_ids: user.id
last_response.should be_ok
payload = JSON.parse last_response.body
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment