diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-13 16:23:00 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-13 16:23:00 +0100 |
commit | de458e7865f91f187b1695c889fc77ea47f1497c (patch) | |
tree | 4ba4d124d6785d0a9942c637120264e47242df7b /test | |
parent | fed5c23d21b75d9a4ee8ca8a6a3e398fae483b8b (diff) | |
parent | a344112c03f3d6c016f5f4c48e5c932b840f6ab1 (diff) |
Merge branch 'develop'
Diffstat (limited to 'test')
-rw-r--r-- | test/mastodon-profile-tests.el | 4 | ||||
-rw-r--r-- | test/mastodon-toot-tests.el | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test/mastodon-profile-tests.el b/test/mastodon-profile-tests.el index 640afb7..267e48b 100644 --- a/test/mastodon-profile-tests.el +++ b/test/mastodon-profile-tests.el @@ -240,7 +240,7 @@ content generation in the function under test." []) (mock (mastodon-profile--relationships-get "1") => - [((id . "1") (following . :json-false) (showing_reblogs . :json-false) (notifying . :json-false) (followed_by . :json-false) (blocking . :json-false) (blocked_by . :json-false) (muting . :json-false) (muting_notifications . :json-false) (requested . :json-false) (domain_blocking . :json-false) (endorsed . :json-false) (note . ""))]) + '(((id . "1") (following . :json-false) (showing_reblogs . :json-false) (notifying . :json-false) (followed_by . :json-false) (blocking . :json-false) (blocked_by . :json-false) (muting . :json-false) (muting_notifications . :json-false) (requested . :json-false) (domain_blocking . :json-false) (endorsed . :json-false) (note . "")))) ;; Let's not do formatting as that makes it hard to not rely on ;; window width and reflowing the text. (mock (shr-render-region * *) => nil) @@ -259,7 +259,7 @@ content generation in the function under test." (buffer-substring-no-properties (point-min) (point-max)) (concat "\n" - "[img] \n" + "[img] [img] \n" "Eugen\n" "@Gargron\n" " ------------\n" diff --git a/test/mastodon-toot-tests.el b/test/mastodon-toot-tests.el index 5b95cdc..39e0984 100644 --- a/test/mastodon-toot-tests.el +++ b/test/mastodon-toot-tests.el @@ -92,10 +92,13 @@ mention string." ;; TODO: test y-or-no-p with mastodon-toot--cancel (ert-deftest mastodon-toot--kill () "Should kill the buffer when cancelling the toot." - (with-mock - (mock (kill-buffer-and-window)) - (mastodon-toot--kill) - (mock-verify))) + (let ((mastodon-toot-previous-window-config + (list (current-window-configuration) + (point-marker)))) + (with-mock + (mock (kill-buffer-and-window)) + (mastodon-toot--kill) + (mock-verify)))) (ert-deftest mastodon-toot--own-toot-p-fail () "Should not return t if not own toot." |