require 'oj'
require 'database_cleaner'
-DatabaseCleaner.strategy = :truncation
+DatabaseCleaner.strategy = :deletion
class WebsocketTest < ActionDispatch::IntegrationTest
self.use_transactional_fixtures = false
authorize_with :admin
- lastid = logs(:log3).id
+ lastid = logs(:admin_changes_specimen).id
l1 = nil
l2 = nil
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