it "handles malformed emails" do
    data = { email: "wrong", password: "wrong" }
    post :create, params: data, format: :json
    expect(json["errors"][0]["title"]).to eq('Email isn\'t in the right format')
    expect(response.status).to eq(422)