-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-org-export-todoist.el
48 lines (35 loc) · 2.26 KB
/
test-org-export-todoist.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;;; test-org-export-todoist.el --- Unit test of org-export-todoist.el -*- lexical-binding: t; -*-
;; Copyright (C) 2022 Masaki Waga
;; This file is NOT part of Emacs.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of the
;; License, or (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
;; USA
;; Version: HEAD
;; Author: Masaki Waga
;; Keywords: todoist org-mode
;; URL: https://github.com/MasWag/org-export-todoist
;; License: GNU General Public License >= 3
;;; Code:
(require 'ert)
(load-file "./org-export-todoist.el")
(defvar example-projects
'(((id . 937158224) (color . 48) (name . "Inbox") (comment_count . 0) (shared . :json-false) (favorite . :json-false) (sync_id . 0) (inbox_project . t)) ((id . 937158360) (order . 1) (color . 35) (name . "Research") (comment_count . 0) (shared . :json-false) (favorite . :json-false) (sync_id . 0)) ((id . 2203704045) (parent . 937158360) (parent_id . 937158360) (order . 8) (color . 35) (name . "Symbolic Monitoring") (comment_count . 3) (shared . :json-false) (favorite . t) (sync_id . 0))))
(ert-deftest test-org-export-todoist--find-todoist-project-id--example-inbox ()
(should (= 937158224
(org-export-todoist--find-todoist-project-id example-projects "Inbox"))))
(ert-deftest test-org-export-todoist--find-todoist-project-id--example-research ()
(should (= 937158360
(org-export-todoist--find-todoist-project-id example-projects "Research"))))
(ert-deftest test-org-export-todoist--find-todoist-project-id--example-symbolic-monitoring ()
(should (= 2203704045
(org-export-todoist--find-todoist-project-id example-projects "Symbolic Monitoring"))))
;;; test-org-export-todoist.el ends here