Sha256: d04f337c295a2277c625a3b664c724d25d6331a4333c6f4653edf163e02db8d4
Contents?: true
Size: 839 Bytes
Versions: 21
Compression:
Stored size: 839 Bytes
Contents
require 'test_helper' class TaskDefinitionsTest < ActiveSupport::TestCase setup do @definition = TaskDefinition.new( 'restart', 'action' => 'Restart application', 'description' => 'Restart app and job servers', 'steps' => ['touch tmp/restart'], ) end test ".load returns nil if payload is nil or blank" do assert_nil TaskDefinition.load('') assert_nil TaskDefinition.load(nil) end test ".dump returns nil if given nil" do assert_nil TaskDefinition.dump(nil) end test "serialization works" do as_json = { id: 'restart', action: 'Restart application', description: 'Restart app and job servers', steps: ['touch tmp/restart'], checklist: [], } assert_equal as_json, TaskDefinition.load(TaskDefinition.dump(@definition)).as_json end end
Version data entries
21 entries across 21 versions & 1 rubygems