-
Notifications
You must be signed in to change notification settings - Fork 23
assert.ok
binodnp edited this page Aug 14, 2014
·
2 revisions
Should be placed at the end of a test function's body to propose that the test passed.
CREATE FUNCTION assert.ok(message text)
RETURNS text
Parameter | Parameter Name | Data Type | Description |
---|---|---|---|
$1 | message | text | A message to be displayed in the end of each test. If displayed means the test passed. |
The following function is an empty test.
DROP FUNCTION IF EXISTS unit_tests.assert_ok_example();
CREATE FUNCTION unit_tests.assert_ok_example()
RETURNS test_result
AS
$$
DECLARE message test_result;
BEGIN
SELECT assert.ok('End of test.') INTO message;
RETURN message;
END
$$
LANGUAGE plpgsql;
##See Also