One last quick test inside of our current user test file so I want to make sure that if we are not signed
in we get back a current user of No.
So this will be really easy to put together.
We'll put together another block down here and we'll say it responds with null if not authenticated
then we'll get our response from a wait request app.
I can make a GET request to API users current user and then of course this time I'm not going to try
to set any cookie because we want to make an authentic heated request.
I'm going to send it off even though I'm not authenticated I should still get back a two hundred let's
make sure that still the case that we could take a look at that response body and make sure that current
user is no took a bit down.
Expect response not body for a user to equal no
going to say that.
Take a look at our tests very good.
All right well that is pretty much it for testing on our auth service.
We've got some tests around all these root handlers.
Now remember there are two other types of tests we're going to eventually write as well.
We're going to eventually start to write tests around our models and around some event handling stuff
as well.
But our model in this case the user model does really have a lot of logic tied to it compared to some
other models we're going to eventually put together.
So I'm not gonna worry about writing any tests around the User model just yet.
In addition we have not wired up any event stuff to our service just yet.
We're not going to worry about that either.
Let's take a pause right here and continue in just a moment.