summaryrefslogtreecommitdiffstats
path: root/test/test_go.rb
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-12-25 16:27:02 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-12-25 16:27:02 +0900
commit750b2a63130fc6b67aaa64c59d42cff428c26b4a (patch)
tree90ccd737354b601b0b884951149fdbaf314f1e4c /test/test_go.rb
parentde0da86bd7089a92f0910877b6a511ba825a1f5d (diff)
Add GET endpoints for getting the state of the finder
* GET / (or GET /current) * GET /query
Diffstat (limited to 'test/test_go.rb')
-rwxr-xr-xtest/test_go.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 4c424396..5dcad12b 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2440,9 +2440,12 @@ class TestGoFZF < TestBase
def test_listen
tmux.send_keys 'seq 10 | fzf --listen 6266', :Enter
tmux.until { |lines| assert_equal 10, lines.item_count }
- Net::HTTP.post(URI('http://localhost:6266'), 'change-query(yo)+reload(seq 100)+change-prompt:hundred> ')
+ Net::HTTP.post(URI('http://localhost:6266'), 'change-query(00)+reload(seq 100)+change-prompt:hundred> ')
tmux.until { |lines| assert_equal 100, lines.item_count }
- tmux.until { |lines| assert_equal 'hundred> yo', lines[-1] }
+ tmux.until { |lines| assert_equal 'hundred> 00', lines[-1] }
+ assert_equal '100', Net::HTTP.get(URI('http://localhost:6266'))
+ assert_equal '100', Net::HTTP.get(URI('http://localhost:6266/current'))
+ assert_equal '00', Net::HTTP.get(URI('http://localhost:6266/query'))
end
end