Commit f404a478 authored by to1ne's avatar to1ne

Get started with ert unit tests

parent a4407446
Pipeline #49601556 passed with stage
in 28 seconds
image: iquiw/alpine-emacs
before_script:
- apk add --update make
stages:
- test
- deploy
ert:
stage: test
script:
- make test
test: org-gitlab-test.el
$(BATCH) --load $< --funcall "ert-run-tests-batch-and-exit"
EMACSBIN ?= emacs
BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH)
LOAD_PATH = -L $(TOP)
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
.PHONY: test
;;; org-gitlab-test.el --- Test for org-gitlab.el -*- lexical-binding: t; -*-
;; Copyright (C) 2019 Toon Claes
;; Author: Toon Claes <toon@iotcl.com>
;; Keywords: convenience
;; 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 3 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, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; These are a bunch of unit tests for org-gitlab.el.
;;; Code:
;; We won't be making any real requests here, so stub the package
(provide 'request)
(require 'ert)
(require 'org-gitlab)
(ert-deftest org-gitlab-test/compose-uri ()
(should (equal (org-gitlab--compose-uri "todos")
"https://gitlab.com/api/v4/todos/")))
(provide 'org-gitlab-test)
;;; org-gitlab-test.el ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment