X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/51e79a3be745cfd37efc49471ae21a1d54662e7f..702ce6c3da9a1b09a2ed546fd3da775d21bd703b:/services/api/test/integration/websocket_test.rb diff --git a/services/api/test/integration/websocket_test.rb b/services/api/test/integration/websocket_test.rb index 7780ccb87c..9179acd680 100644 --- a/services/api/test/integration/websocket_test.rb +++ b/services/api/test/integration/websocket_test.rb @@ -3,7 +3,7 @@ require 'websocket_runner' require 'oj' require 'database_cleaner' -DatabaseCleaner.strategy = :truncation +DatabaseCleaner.strategy = :deletion class WebsocketTest < ActionDispatch::IntegrationTest self.use_transactional_fixtures = false @@ -283,7 +283,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest authorize_with :admin - lastid = logs(:log3).id + lastid = logs(:admin_changes_specimen).id l1 = nil l2 = nil @@ -311,11 +311,11 @@ class WebsocketTest < ActionDispatch::IntegrationTest assert false, "Should not get any more events" end end - end - assert_equal logs(:log4).object_uuid, l1 - assert_equal logs(:log5).object_uuid, l2 + expect_next_logs = Log.where('id > ?', lastid).order('id asc') + assert_equal expect_next_logs[0].object_uuid, l1 + assert_equal expect_next_logs[1].object_uuid, l2 end test "connect, subscribe, get event, unsubscribe" do