       {:ok, _} = Accounts.create_user_with_api_token(token, "test")
       upload = fixture(:upload, %{path: "1/asciicast.json"})
       conn = post conn, api_asciicast_path(conn, :create), %{"asciicast" => upload}
-      assert text_response(conn, 201) =~ @asciicast_url
+      assert text_response(conn, 201) =~ @successful_response
       assert List.first(get_resp_header(conn, "location")) =~ @asciicast_url
     end
 

  end

  @asciicast_url ~r|^http://localhost:4001/a/[a-zA-Z0-9]{25}|

  describe ".create" do
    @tag token: nil

                                                          content_type: "application/octet-stream"})}

      conn = post conn, api_asciicast_path(conn, :create), %{"asciicast" => asciicast}
      assert text_response(conn, 201) =~ @successful_response
      assert List.first(get_resp_header(conn, "location")) =~ @asciicast_url
    end

