Current section
Files
Jump to
Current section
Files
test/moebius/function_test.exs
defmodule Moebius.FunctionTest do
use ExUnit.Case
import Moebius.Query
test "a simple function call is constructed" do
cmd = function_command(:all_users)
assert cmd.sql == "select * from all_users();"
end
test "a simple function call is constructed with args" do
cmd = function_command(:all_users, name: "steve")
assert cmd.sql == "select * from all_users($1);"
assert length(cmd.params) == 1
end
end