Skip to content

Commit

Permalink
Update myxql_test.exs
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski authored Jul 6, 2024
1 parent a559fd5 commit 90a1903
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/myxql_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ defmodule MyXQLTest do
log = &send(self, &1)

assert {:ok, %MyXQL.Result{}} =
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT VALUES (?)';", [], query_type: :text, log: log)
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], query_type: :text, log: log)

assert_receive %DBConnection.LogEntry{query: %MyXQL.TextQuery{}}

assert {:error, %MyXQL.Error{mysql: %{code: 1295}}} =
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT VALUES (?)'", [], query_type: :binary, log: log)
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], query_type: :binary, log: log)

assert_receive %DBConnection.LogEntry{query: %MyXQL.Query{}}

assert {:ok, %MyXQL.Result{}} =
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT VALUES (?)'", [], query_type: :binary_then_text, log: log)
MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], query_type: :binary_then_text, log: log)

assert_receive %DBConnection.LogEntry{query: %MyXQL.Query{}}
end
Expand Down

0 comments on commit 90a1903

Please sign in to comment.