~niklaseklund/egerrit

86b1079e0089e9fc2f338589f4ec4cd712fef98d — Niklas Eklund a month ago dabf0e9
Fix broken tests
2 files changed, 7 insertions(+), 7 deletions(-)

M egerrit-core.el
M test/egerrit-test.el
M egerrit-core.el => egerrit-core.el +5 -4
@@ 369,10 369,11 @@ Optionally provide a NAME-CONTAIN variable to narrow the search space."

(defun egerrit--compensate-time-with-timezone (utc-time)
  "Compensate UTC-TIME to time-zone on the local-host."
  (let ((time-zone (current-time-zone)))
    (format-time-string "%Y-%m-%d %H:%M:%S %z"
                        (time-add (date-to-time utc-time)
                                  (car time-zone)))))
  (when utc-time
    (let ((time-zone (current-time-zone)))
      (format-time-string "%Y-%m-%d %H:%M:%S %z"
                          (time-add (date-to-time utc-time)
                                    (car time-zone))))))

(provide 'egerrit-core)


M test/egerrit-test.el => test/egerrit-test.el +2 -3
@@ 162,14 162,12 @@
  (cl-letf* (((symbol-function 'egerrit--create-commit) (lambda (commit) commit))
             ((symbol-function 'egerrit--create-user) (lambda (uploader) uploader))
             (revisions `((abc . ((_number . 1)
                                  (created . "2021")
                                  (uploader . "Foo")
                                  (ref . "abc123")
                                  (commit . "commit")))))
             (expected (list (egerrit--revision-create
                              :id 'abc
                              :number 1
                              :created "2021"
                              :uploader "Foo"
                              :ref "abc123"
                              :fetch (egerrit--create-fetch nil)


@@ 268,7 266,8 @@
  (let* ((message-content
          "Patch Set 7: Verified-1\n\nBuild failed.\n\n- project--job-foo https://cijobs.net/job/foo/71010/ : SUCCESS in 3m 31s\n- project--job-bar https://cijobs.net/job/bar/71010/ : FAILURE in 1m 06s")
         (message (egerrit--message-create :number 1
                                              :message message-content))
                                           :message message-content
                                           :date "2022-06-14 09:39:33.000000000"))
         (regexp (rx-to-string
                  `(and bol "- project--"
                        (group (regexp ".*?")) " "