summaryrefslogtreecommitdiffstats
path: root/tests/test_main.py
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble.spam@gmail.com>2015-10-03 14:41:31 -0400
committerDarik Gamble <darik.gamble.spam@gmail.com>2015-10-03 14:41:50 -0400
commitbb12d553a42f99442598d8603a3ff2ab7e4240e6 (patch)
tree9a2c9448ffe3654953a7dd3879f86e2d2e1a90d2 /tests/test_main.py
parent517e20224eb4ac3361a5fda900b7a259e7fdb0ee (diff)
Fix need_completion_refresh
Was only actually checking the first command in multiple commands
Diffstat (limited to 'tests/test_main.py')
-rw-r--r--tests/test_main.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_main.py b/tests/test_main.py
new file mode 100644
index 00000000..e25f7f08
--- /dev/null
+++ b/tests/test_main.py
@@ -0,0 +1,10 @@
+import pytest
+from pgcli.main import need_completion_refresh
+
+
+@pytest.mark.parametrize('sql', [
+ 'DROP TABLE foo',
+ 'SELECT * FROM foo; DROP TABLE foo',
+])
+def test_need_completion_refresh(sql):
+ assert need_completion_refresh(sql) \ No newline at end of file