Mainflux.mainflux/twins/mocks
b1ackd0t 1f21541a27
NOISSUE - Fix Twins Tests (#1931)
* feat(twins/mocks): Add new service constructor with mock dependencies

This commit adds a new service constructor to the `twins/mocks/service.go` file. The new constructor, `NewService`, takes no arguments and returns an instance of `twins.Service` along with a mock instance of `authmocks.Service`. This allows for the creation of a real twins service using mock dependencies.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(api): Add tests for endpoint states

This commit adds tests for the endpoint states API in the `endpoint_states_test.go` file. The tests cover the functionality of the `GET` and `POST` methods for retrieving and updating the states of endpoints respectively. The tests use the `mainflux` and `authmocks` packages for mocking and testing the API endpoints. Additionally, the `testsutil` package is imported for utility functions used in the tests.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-20 23:06:03 +02:00
..
commons.go MF-730 - Add digital twin service for things (#855) 2020-01-10 17:25:36 +01:00
doc.go MF-1506 - Group-based Access Control (#1716) 2023-06-14 12:40:37 +02:00
messages.go MF-786 - Tracing over NATS using opentracing standard (#1739) 2023-04-20 21:39:33 +02:00
service.go NOISSUE - Fix Twins Tests (#1931) 2023-10-20 23:06:03 +02:00
states.go MF-1506 - Group-based Access Control (#1716) 2023-06-14 12:40:37 +02:00
twins.go MF-1263 - Move repeating errors to the separate package (#1540) 2022-01-27 17:03:57 +01:00