Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusfrancisco committed Mar 22, 2024
1 parent c9ae6c2 commit 6249a2b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
38 changes: 19 additions & 19 deletions test/integration/io/easybootstrap/template/db/postgres/db_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@
:cleanup utils/stop-system!
:fail-fast? true}
(flow "creates a table, insert data and checks return in the database"
[database (state-flow.api/get-state :database)]
[database (state-flow.api/get-state :database)]

(state/invoke
#(db.postgres.job/insert-job-transaction
{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/description "We are looking for a Software Engineer II to join our team"}
database))
(state/invoke
#(db.postgres.job/insert-job-transaction
{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/description "We are looking for a Software Engineer II to join our team"}
database))

(flow "check transaction was inserted in db"
(match? [{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/created_at inst?
:job/description "We are looking for a Software Engineer II to join our team"}]
(db.postgres.job/get-all-jobs database)))
(flow "check transaction was inserted in db"
(match? [{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/created_at inst?
:job/description "We are looking for a Software Engineer II to join our team"}]
(db.postgres.job/get-all-jobs database)))

(flow "check get by id, should return a job"
(match? {:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/created_at inst?
:job/description "We are looking for a Software Engineer II to join our team"}
(db.postgres.job/get-by-id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7" database)))))
(flow "check get by id, should return a job"
(match? {:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/created_at inst?
:job/description "We are looking for a Software Engineer II to join our team"}
(db.postgres.job/get-by-id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7" database)))))
76 changes: 38 additions & 38 deletions test/integration/io/easybootstrap/template/http_in/job_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -37,45 +37,45 @@
:fail-fast? true}
(flow "should interact with system"

(flow "prepare system with mocks"
[database (state-flow.api/get-state :database)]
(state/invoke
#(db.postgres.job/insert-job-transaction
{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/description "We are looking for a Software Engineer II to join our team"}
database))
(flow "prepare system with mocks"
[database (state-flow.api/get-state :database)]
(state/invoke
#(db.postgres.job/insert-job-transaction
{:job/id #uuid "cd989358-af38-4a2f-a1a1-88096aa425a7"
:job/title "Software Engineer II"
:job/description "We are looking for a Software Engineer II to join our team"}
database))

(flow "should insert deposit into wallet"
(match? (matchers/embeds {:status 200
:body {:jobs [{:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}]}})
(aux.server/request! {:method :get
:uri "/job/"})))
(flow "should insert deposit into wallet"
(match? (matchers/embeds {:status 200
:body {:jobs [{:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}]}})
(aux.server/request! {:method :get
:uri "/job/"})))

(flow "should insert a new job"
(match? (matchers/embeds {:status 201
:body {:id string? :title "SWE III" :description "We are looking for a Software Engineer III to join our team to work with clojure"}})
(aux.server/request! {:method :post
:uri "/job/"
:body {:title "SWE III" :description "We are looking for a Software Engineer III to join our team to work with clojure"}})))
(flow "should insert a new job"
(match? (matchers/embeds {:status 201
:body {:id string? :title "SWE III" :description "We are looking for a Software Engineer III to join our team to work with clojure"}})
(aux.server/request! {:method :post
:uri "/job/"
:body {:title "SWE III" :description "We are looking for a Software Engineer III to join our team to work with clojure"}})))

(flow "should list all jobs"
(match? (matchers/embeds {:status 200
:body {:jobs [{:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}
{:id string?
:title "SWE III"
:description "We are looking for a Software Engineer III to join our team to work with clojure"}]}})
(aux.server/request! {:method :get
:uri "/job/"})))
(flow "should list all jobs"
(match? (matchers/embeds {:status 200
:body {:jobs [{:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}
{:id string?
:title "SWE III"
:description "We are looking for a Software Engineer III to join our team to work with clojure"}]}})
(aux.server/request! {:method :get
:uri "/job/"})))

(flow "should get job by id"
(match? (matchers/embeds {:status 200
:body {:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}})
(aux.server/request! {:method :get
:uri "/job/cd989358-af38-4a2f-a1a1-88096aa425a7"}))))))
(flow "should get job by id"
(match? (matchers/embeds {:status 200
:body {:id "cd989358-af38-4a2f-a1a1-88096aa425a7"
:title "Software Engineer II"
:description "We are looking for a Software Engineer II to join our team"}})
(aux.server/request! {:method :get
:uri "/job/cd989358-af38-4a2f-a1a1-88096aa425a7"}))))))

0 comments on commit 6249a2b

Please sign in to comment.