title: test login with chai
body: <p>How can i check test that the email is the same that is logged in, and how can i check it's been saved in localstorage?? please help</p>
  <p>code:</p>
  <pre><code>const {expect} = require('chai')
  const chai = require('chai')
  const chaiHttp = require('chai-http')
  const user = require('../src/controllers/user-controller')
  chai.use(chaiHttp)
  
  describe('API', () =&gt; {
  describe('Post /Login', () =&gt; {
      it('should login', (done)=&gt;{
          const user = {email:&quot;mikkel.wager@gmail.com&quot;,password:&quot;password123&quot;}
  
        chai
        .request(&quot;http://localhost:8200/users&quot;)
        .post('/login')
        .send(user)
        .end((err,res)=&gt;{
          expect(res.status).to.equal(200);
          expect(err).to.be.null;
          expect(res.body.email).to.be(&quot;mikkel.wager@gmail.com&quot;)
          done();
          
        })
      })
  })
  })
  </code></pre>