Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Tests for api #129

Merged
merged 3 commits into from
Sep 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions backend/old_tests/api/base_test.clj

This file was deleted.

48 changes: 0 additions & 48 deletions backend/old_tests/api/newgame_test.clj

This file was deleted.

15 changes: 0 additions & 15 deletions backend/old_tests/mocking.clj

This file was deleted.

2 changes: 1 addition & 1 deletion backend/src/rules/count_cards.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns rules.count-cards)

(defn count-cards
"Count all cards that has keys as in condition an sums their summand"
"Count (or sums the summands of) all cards that have keys as in condition "
[game-state condition & summand]
(let [k (vec (keys condition))
summand (first summand)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns api.join-game-test
(ns api.base-test
(:require [expectations.clojure.test :refer :all]
[clojure.test :as ctest]
[mocking :as mocking]
Expand All @@ -8,6 +8,12 @@

(ctest/use-fixtures :each mocking/mock-persistence)

(defexpect game-creation
(expect 0 (:game-id (base/create-game)))
(expect messages/no-opp (:status (base/create-game)))
(expect nil (:player-ids (base/create-game)))
(expect true (contains? (base/create-game) :player-id)))

(defexpect join-game

(let [joined-game (-> (base/create-game) :game-id base/add-player)]
Expand Down
14 changes: 0 additions & 14 deletions backend/test/api/create_game_test.clj

This file was deleted.