forked from ebhomengo/niki
1
0
Fork 0
NIKI - EBHOME NGO Core Service.
Go to file
hossein a6fd4e2357 Merge pull request 'fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168)' (#172) from stage/ruhollahh01/fix-create-and-update-kindbox-req-by-admin into develop
Reviewed-on: ebhomengo/niki#172
2024-09-16 04:48:55 +00:00
adapter fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
config feat: add CORS middleware configuration with custom allowed origins(#154) 2024-09-08 13:34:06 +03:30
contract/sms fix(niki): internal, validator and structure refactor 2024-08-03 14:37:16 +03:30
delivery/http_server feat(kindbox): add edit kindbox by Admin 2024-09-11 10:09:52 +03:30
deploy feat: add CORS middleware configuration with custom allowed origins(#154) 2024-09-08 13:34:06 +03:30
docs fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168) 2024-09-15 23:47:26 +03:30
entity feat(kindbox): add edit kindbox by Admin 2024-09-11 10:09:52 +03:30
logger feat(niki): added rtx-linter-format 2023-12-20 19:09:25 +03:30
param fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168) 2024-09-15 23:47:26 +03:30
pkg Merge branch 'develop' into stage/erfan/refactor-delivery-response-params 2024-09-11 06:07:19 +00:00
repository fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168) 2024-09-15 23:47:26 +03:30
service fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168) 2024-09-15 23:47:26 +03:30
validator fix(niki): fix create and update kind-box request by admin internal errors (#167 and #168) 2024-09-15 23:47:26 +03:30
vendor vendorize project 2024-08-29 06:56:59 +03:30
.env.example feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
.gitignore refactor(niki): stage deployment docker setup (#130) 2024-08-30 01:40:54 +03:30
.golangci.yml style(niki): apply code formatting and linting (#85) 2024-07-25 03:15:04 +03:30
.mise.toml feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
.mockery.yaml feat(validator): implement unit test for admin login validator (#109) 2024-08-06 15:56:40 +03:30
Dockerfile refactor(niki): stage deployment docker setup (#130) 2024-08-30 01:40:54 +03:30
Makefile fix(makefile): skip formatting vendor and auto generated files 2024-09-09 12:39:57 +03:30
config.yml refactor(niki): stage deployment docker setup (#130) 2024-08-30 01:40:54 +03:30
docker-compose.yaml feat(niki): add swagger not completed 2024-05-14 16:37:09 +03:30
go.mod refactor(niki): stage deployment docker setup (#130) 2024-08-30 01:40:54 +03:30
go.sum feat(niki): setup and implement sample end2end test (#109) 2024-08-17 21:26:08 +03:30
main.go feat(niki): setup and implement sample end2end test (#109) 2024-08-17 21:26:08 +03:30

docs/README.md

Mocking interfaces in unit tests

1- add a //go:generate directive above the interface:

//go:generate mockery --name Repository
type Repository interface {
	AdminExistByPhoneNumber(ctx context.Context, phoneNumber string) (bool, error)
	AdminExistByEmail(ctx context.Context, email string) (bool, error)
}

2- run go generate to create the mock files:

go generate ./...

3- use the generated mock types in your tests.

for more information visit: https://vektra.github.io/mockery/latest/