You create a file called user.rb in the /models directory:

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat


for the service in spec/service_spec.rb, you add another describe block:

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat


For invalid user name and password combinations, the service should return a 400 HTTP status code, which means that the server received a “bad request.” The service could also use the 401 (“unauthorized”) response code, but that code specifies that authentication credentials need to be in the request header, which is not quite what is required.

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat


Many programmers would prefer to mock in their client library specs, but doing so could result in the service and client passing all specs with hidden failures.

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat


Services isolated on business logic can share data sources with other systems.

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat


However, for the purposes of migrating existing Rails applications to services, the shared database approach may be necessary in the early stages.

Paul Dix

Stichwörter: kindlehighlight



Weiter zum Zitat



Seite 1 von 1.


©gutesprueche.com

Data privacy

Imprint
Contact
Wir benutzen Cookies

Diese Website verwendet Cookies, um Ihnen die bestmögliche Funktionalität bieten zu können.

OK Ich lehne Cookies ab