Skip to content

Instantly share code, notes, and snippets.

@olivermt
Created August 24, 2016 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olivermt/e20860c987caa98a5f14124503eff390 to your computer and use it in GitHub Desktop.
Save olivermt/e20860c987caa98a5f14124503eff390 to your computer and use it in GitHub Desktop.
test "logging in multiple times should give more client versions", %{conn: conn} do
conn = put_req_header(conn, "x-auth-token", authenticate("test2@test.com", "12345"))
admin_conn = put_req_header(conn, "x-auth-token", authenticate("admin@test.com", "admin"))
get conn, client_path(conn, :configuration), cversion: "5.222"
#swap over to admin to check that version count was updated sucessfully
admin_conn = get admin_conn, "/api/v1/company/2/user/2/client"
assert json_response(admin_conn, 200)["data"]["client"]["platform_version"] == 5
assert json_response(admin_conn, 200)["data"]["client"]["build_version"] == 222
end
1) test logging in multiple times should give more client versions (Core.ClientControllerTest)
test/controllers/client_controller_test.exs:30
Assertion with == failed
code: json_response(admin_conn, 200)["data"]["client"]["platform_version"] == 5
lhs: nil
rhs: 5
stacktrace:
test/controllers/client_controller_test.exs:37: (test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment