projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 8465-stderr-redirection
[arvados.git]
/
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 a9993b2fc318b4abe6ca0669f64a614250608733..549bbc6f9979d02c9f2f3bccd88cb7a078099c81 100644
(file)
--- a/
services/api/test/integration/websocket_test.rb
+++ b/
services/api/test/integration/websocket_test.rb
@@
-1,6
+1,6
@@
-require 'test_helper'
-require 'oj'
require 'database_cleaner'
require 'database_cleaner'
+require 'safe_json'
+require 'test_helper'
DatabaseCleaner.strategy = :deletion
DatabaseCleaner.strategy = :deletion
@@
-112,7
+112,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
ws_helper do |ws|
ws.on :message do |event|
ws_helper do |ws|
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
status = d["status"]
ws.close
end
status = d["status"]
ws.close
end
@@
-130,7
+130,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
status = d["status"]
ws.close
end
status = d["status"]
ws.close
end
@@
-152,7
+152,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-189,7
+189,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-229,7
+229,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-268,7
+268,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-312,7
+312,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-350,7
+350,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-394,7
+394,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-442,7
+442,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-487,7
+487,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-557,7
+557,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-581,7
+581,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
status = d["status"]
ws.close
end
status = d["status"]
ws.close
end
@@
-599,7
+599,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
status = d["status"]
ws.close
end
status = d["status"]
ws.close
end
@@
-617,7
+617,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
status = d["status"]
ws.close
end
status = d["status"]
ws.close
end
@@
-640,7
+640,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when (1..Rails.configuration.websocket_max_filters)
assert_equal 200, d["status"]
case state
when (1..Rails.configuration.websocket_max_filters)
assert_equal 200, d["status"]
@@
-675,7
+675,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]
@@
-712,7
+712,7
@@
class WebsocketTest < ActionDispatch::IntegrationTest
end
ws.on :message do |event|
end
ws.on :message do |event|
- d =
Oj.strict_
load event.data
+ d =
SafeJSON.
load event.data
case state
when 1
assert_equal 200, d["status"]
case state
when 1
assert_equal 200, d["status"]