Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @valid_school_bmu %{adr_city: "Somewhere",
- adr_line_1: "555 Some St",
- adr_line_2: "Suite 100",
- adr_state: "TN",
- adr_zip: "37203",
- is_active: true,
- is_editable: true,
- name: "BMU",
- timezone: "-8",
- email_domains: [
- %{
- email_domain: "@bmu.edu",
- is_professor_only: false
- },
- %{
- email_domain: "@abc.edu",
- is_professor_only: false
- }
- ]}
- test "Create/2 creates and responds with a newly created school if attributes are valid", %{jwt: jwt} do
- response = build_conn()
- |> put_req_header("authorization", "Bearer #{jwt}")
- |> put_req_header("content-type", "application/json")
- |> post(v1_school_path(build_conn(), :create, Poison.encode!(@valid_school_bmu)))
- |> json_response(200)
- assert response["id"] |> is_integer
- assert response["id"] > 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement