diff options
author | Jani Nikula <jani@nikula.org> | 2013-09-03 08:19:03 +0300 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-09-03 20:49:46 -0300 |
commit | 2f7cfcd320ba2ce11834756ec8cbca8b9245e62d (patch) | |
tree | ec3d1fce0677fd1e5e1d3638780d7224f4e1ec4f /test | |
parent | 8ffc60e989a9857855c5429697da80e00785eeec (diff) |
test: improve insert test reliability by checking message-id instead of count
There isn't a reported issue this would fix. Spotted by reading the
test.
Diffstat (limited to 'test')
-rwxr-xr-x | test/insert | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/insert b/test/insert index 9b448e5a..550b4132 100755 --- a/test/insert +++ b/test/insert @@ -68,14 +68,14 @@ test_expect_equal_json "$output" '["inbox", "unread"]' test_begin_subtest "Insert message, add tag" gen_insert_msg notmuch insert +custom < "$gen_msg_filename" -output=$(notmuch count tag:custom) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages tag:custom) +test_expect_equal "$output" "id:$gen_msg_id" test_begin_subtest "Insert message, add/remove tags" gen_insert_msg notmuch insert +custom -unread < "$gen_msg_filename" -output=$(notmuch count tag:custom NOT tag:unread) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages tag:custom NOT tag:unread) +test_expect_equal "$output" "id:$gen_msg_id" test_begin_subtest "Insert message with default tags stays in new/" gen_insert_msg @@ -123,8 +123,8 @@ test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new" test_begin_subtest "Insert message into folder, add/remove tags" gen_insert_msg notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename" -output=$(notmuch count folder:Drafts tag:draft NOT tag:unread) -test_expect_equal "$output" "1" +output=$(notmuch search --output=messages folder:Drafts tag:draft NOT tag:unread) +test_expect_equal "$output" "id:$gen_msg_id" gen_insert_msg test_expect_code 1 "Insert message into non-existent folder" \ |