Skip to content

Instantly share code, notes, and snippets.

@lagenorhynque
Last active November 26, 2018 11:53
Show Gist options
  • Save lagenorhynque/5398c8ef3b5f1203cb613237eca2f042 to your computer and use it in GitHub Desktop.
Save lagenorhynque/5398c8ef3b5f1203cb613237eca2f042 to your computer and use it in GitHub Desktop.
lacinia-pedestal e2e testing
(t/deftest test-list-users
(with-system [sys (helper/test-system)]
(with-db-data [sys {:user db-data/user}]
(t/testing "ユーザの一覧が取得できる"
(t/testing "ユーザ名指定あり"
(let [{:keys [status body]}
(helper/http-post sys "/graphql"
(venia/graphql-query
{:venia/queries [[:users {:name "曜"}
[:id
:employee_number
:uid
:name]]]}))]
(t/is (= 200 status))
(t/is (= {:data {:users [{:id 1
:employee_number "000001"
:uid "y.watanabe"
:name "渡辺 曜"}]}}
(helper/<-json body)))))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment