File tree Expand file tree Collapse file tree 2 files changed +263
-193
lines changed
test/end-to-end/company/:id Expand file tree Collapse file tree 2 files changed +263
-193
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,18 @@ describe("PUT /company/disable", () => {
1818
1919 const test_agent = agent ( ) ;
2020
21+ beforeAll ( async ( ) => {
22+ await Company . deleteMany ( { } ) ;
23+ await Offer . deleteMany ( { } ) ;
24+ await Account . deleteMany ( { } ) ;
25+ } ) ;
26+
27+ afterAll ( async ( ) => {
28+ await Company . deleteMany ( { } ) ;
29+ await Offer . deleteMany ( { } ) ;
30+ await Account . deleteMany ( { } ) ;
31+ } ) ;
32+
2133 describe ( "ID Validation" , ( ) => {
2234 test ( "Should fail if id is not a valid ObjectID" , async ( ) => {
2335 const id = "123" ;
@@ -154,6 +166,12 @@ describe("PUT /company/disable", () => {
154166 } ) ;
155167 } ) ;
156168
169+ afterEach ( async ( ) => {
170+ await test_agent
171+ . delete ( "/auth/login" )
172+ . expect ( StatusCodes . OK ) ;
173+ } ) ;
174+
157175 test ( "should fail to disable company if logged as different company" , async ( ) => {
158176
159177 await test_agent
You can’t perform that action at this time.
0 commit comments