Skip to content

Commit

Permalink
more stable test for Import.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Feb 29, 2024
1 parent 36bc112 commit eac1b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class ApiTest < Minitest::Spec

signal, (ctx, _) = Trailblazer::Developer.wtf?(Trailblazer::Pro::Editor::Import, [{
diagram_slug: "b0f945",
target_filename: "test/imported_json/b0f945.json",
target_filename: "#{Dir.pwd}/test/imported_json/b0f945.json",
session: Trailblazer::Pro::Session.session
},
{}
])

assert_equal File.read("test/imported_json/b0f945.json"), %({\"id\":3,\"type\":\"collaboration\",\"lanes\":[{\"id\":\"lifecycle\",\"type\":\"lane\",\"elements\":[{\"id\":\"Activity_0dgrwre\",\"label\":\"Create\",\"type\":\"task\",\"data\":{},\"links\":[{\"target_id\":\"throw-after-Activity_0dgrwre\",\"semantic\":\"success\"}]},{\"id\":\"catch-before-Activity_0dgrwre\",\"label\":null,\"type\":\"catch_event\",\"data\":{\"start_task\":true},\"links\":[{\"target_id\":\"Activity_0dgrwre\",\"semantic\":\"success\"}]},{\"id\":\"throw-after-Activity_0dgrwre\",\"label\":null,\"type\":\"throw_event\",\"data\":{},\"links\":[]},{\"id\":\"suspend-gw-to-catch-before-Activity_0dgrwre\",\"label\":null,\"type\":\"suspend\",\"data\":{\"resumes\":[\"catch-before-Activity_0dgrwre\"]},\"links\":[]}]}],\"messages\":[]}) # a particular eloquent diagram.
assert_equal File.read("#{Dir.pwd}/test/imported_json/b0f945.json"), %({\"id\":3,\"type\":\"collaboration\",\"lanes\":[{\"id\":\"lifecycle\",\"type\":\"lane\",\"elements\":[{\"id\":\"Activity_0dgrwre\",\"label\":\"Create\",\"type\":\"task\",\"data\":{},\"links\":[{\"target_id\":\"throw-after-Activity_0dgrwre\",\"semantic\":\"success\"}]},{\"id\":\"catch-before-Activity_0dgrwre\",\"label\":null,\"type\":\"catch_event\",\"data\":{\"start_task\":true},\"links\":[{\"target_id\":\"Activity_0dgrwre\",\"semantic\":\"success\"}]},{\"id\":\"throw-after-Activity_0dgrwre\",\"label\":null,\"type\":\"throw_event\",\"data\":{},\"links\":[]},{\"id\":\"suspend-gw-to-catch-before-Activity_0dgrwre\",\"label\":null,\"type\":\"suspend\",\"data\":{\"resumes\":[\"catch-before-Activity_0dgrwre\"]},\"links\":[]}]}],\"messages\":[]}) # a particular eloquent diagram.
end

it "401 unauthorized because not owner of diagram " do
Expand Down

0 comments on commit eac1b70

Please sign in to comment.