File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ def extract_named_params(command_string)
5858 arg = command_string [ last_index ..-1 ]
5959 matches = arg . match ( / --(\S +)(.*)/ )
6060 params [ matches [ 1 ] ] = matches [ 2 ] . strip
61+ params [ matches [ 1 ] ] = "true" unless params [ matches [ 1 ] ] . present?
6162 command_string = command_string . slice ( 0 , last_index )
6263 end
6364
Original file line number Diff line number Diff line change @@ -227,6 +227,13 @@ def ensure_app_given
227227 expect ( chatop_response ) . to eq "You can deploy foobar just fine."
228228 end
229229
230+ it "works with boolean arguments" do
231+ chat "where can i deploy foobar --this-is-sparta" , "bhuga"
232+ expect ( request . params [ "action" ] ) . to eq "wcid"
233+ expect ( request . params [ "user" ] ) . to eq "bhuga"
234+ expect ( request . params [ "params" ] [ "this-is-sparta" ] ) . to eq "true"
235+ end
236+
230237 it "anchors regexes" do
231238 expect {
232239 chat "too bad that this message doesn't start with where can i deploy foobar" , "bhuga"
You can’t perform that action at this time.
0 commit comments