diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-25 16:27:02 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-25 16:27:02 +0900 |
commit | 750b2a63130fc6b67aaa64c59d42cff428c26b4a (patch) | |
tree | 90ccd737354b601b0b884951149fdbaf314f1e4c /test/test_go.rb | |
parent | de0da86bd7089a92f0910877b6a511ba825a1f5d (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-x | test/test_go.rb | 7 |
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 |