Skip to content

Commit

Permalink
hot fix: edit pipelines sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
YehiaFarghaly committed Jan 13, 2024
1 parent c183126 commit bd4ac1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/authentication-microservice-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
name: Authentication CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_run:
workflows: ["Clinic CI"]
types:
- completed

jobs:
lint-and-test-clinic:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/patient-microservice-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
name: Patient CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_run:
workflows: ["Authentication CI"]
types:
- completed

jobs:
lint-and-test-patient:
Expand Down
14 changes: 0 additions & 14 deletions authentication/src/tests/api-tests/AuthenticationAPI.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,6 @@ describe('POST /login/:request', () => {
expect(JSON.parse(res.text).message).toBe(INCORRECT_PASSWORD_ERROR_MESSAGE);
});

it('should return 200 the correct user', async () => {
const userId = faker.database.mongodbObjectId();
const email = faker.internet.email();
const userName = faker.internet.userName();
const password = faker.internet.password();
const salt = await bcrypt.genSalt();
const HashedPassword = await bcrypt.hash(password, salt);
const user = new User(generateUser(userId, email, userName, PATIENT_ENUM, HashedPassword));
await user.save();
const res = await request(app).post(`/login/${CLINIC_REQ}`).send({ userName, password });
expect(res.status).toBe(OK_REQUEST_CODE_200);
expect(JSON.parse(res.text).userName).toBe(userName);
});

afterEach(async () => {
await disconnectDBTest();
})
Expand Down

0 comments on commit bd4ac1b

Please sign in to comment.