{ "title": "GOOD DEFAULT TESTS", "desc": "testing correct input with the default profile.", "tests": [ { "name": "new profile", "cmds": [ ["new-profile"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [] } },{ "name": "add note", "cmds": [ ["new-profile"], ["add", "this is the title"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "" } ] } },{ "name": "add full note (body from arg)", "cmds": [ ["new-profile"], ["add", "this is the title", "-s", "-b", "test body"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "Started", "body": "test body" } ] } },{ "name": "add full note (body from stdin)", "cmds": [ ["new-profile"], ["add", "this is the title", "-s", "-"] ], "stdin": [ null, "test body" ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "Started", "body": "test body" } ] } },{ "name": "add statuses", "cmds": [ ["new-profile"], ["add", "a"], ["add", "b", "-s"], ["add", "c", "-u"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "a", "status": "", "body": "" },{ "id": 2, "title": "b", "status": "Started", "body": "" },{ "id": 3, "title": "c", "status": "Urgent", "body": "" } ] } },{ "name": "edit title", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1", "new title"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "new title", "status": "", "body": "" } ] } },{ "name": "edit statuses", "cmds": [ ["new-profile"], ["add", "finished", "-u"], ["add", "started"], ["add", "urgent"], ["edit", "1", "-n"], ["edit", "2", "-s"], ["edit", "3", "-u"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "finished", "status": "", "body": "" },{ "id": 2, "title": "started", "status": "Started", "body": "" },{ "id": 3, "title": "urgent", "status": "Urgent", "body": "" } ] } },{ "name": "edit body (from arg)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1", "-b", "a body yo"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "a body yo" } ] } },{ "name": "edit body (from stdin)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1", "-"] ], "stdin": [ null, null, "a body yo" ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "a body yo" } ] } },{ "name": "edit everything (from args)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1", "new title yo", "-b", "a body", "-s"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "new title yo", "status": "Started", "body": "a body" } ] } },{ "name": "edit nothing", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "" } ] } },{ "name": "edit everything (from stdin)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["edit", "1", "new title yo", "-", "-s"] ], "stdin": [ null, null, "a body yo" ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "new title yo", "status": "Started", "body": "a body yo" } ] } },{ "name": "delete note", "cmds": [ ["new-profile"], ["add", "this is the title"], ["del", "1"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [] } },{ "name": "delete multiple notes", "cmds": [ ["new-profile"], ["add", "this is the title"], ["add", "this is the second title"], ["add", "this is the third title"], ["add", "this is the title"], ["add", "this is the title"], ["del", "1", "4", "5"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 2, "title": "this is the second title", "status": "", "body": "" },{ "id": 3, "title": "this is the third title", "status": "", "body": "" } ] } },{ "name": "clear notes (yes from arg)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["add", "this is another title"], ["clear", "-y"] ], "result_path": "default.json", "result": { "encrypted": false, "notes": [] } },{ "name": "clear notes (yes from stdin)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["add", "this is another title"], ["clear"] ], "stdin": [ null, null, null, "y" ], "result_path": "default.json", "result": { "encrypted": false, "notes": [] } },{ "name": "clear notes (no from stdin)", "cmds": [ ["new-profile"], ["add", "this is the title"], ["add", "this is another title"], ["clear"] ], "should_fail": true, "stdin": [ null, null, null, "n" ], "result_path": "default.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "" },{ "id": 2, "title": "this is another title", "status": "", "body": "" } ] } },{ "name": "transfer note (only title)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title"], ["transfer", "1", "to", "second"] ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "" } ] } }, { "name": "transfer note (title+body) (from arg)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title", "-b", "boody yo"], ["transfer", "1", "to", "second"] ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "boody yo" } ] } }, { "name": "transfer note (title+body) (from stdin)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title", "-"], ["transfer", "1", "to", "second"] ], "stdin": [ null, null, "boody", null ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "", "body": "boody" } ] } },{ "name": "transfer note (title+status)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title", "-s"], ["transfer", "1", "to", "second"] ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "Started", "body": "" } ] } },{ "name": "transfer note (title+status+body) (from arg)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title", "-s", "-b", "boody"], ["transfer", "1", "to", "second"] ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "Started", "body": "boody" } ] } },{ "name": "transfer note (title+status+body) (from stdin)", "cmds": [ ["new-profile"], ["new-profile", "second"], ["add", "this is the title", "-s", "-"], ["transfer", "1", "to", "second"] ], "stdin": [ null, null, "boody", null ], "result_path": "second.json", "result": { "encrypted": false, "notes": [ { "id": 1, "title": "this is the title", "status": "Started", "body": "boody" } ] } } ] }