Skip to content

Commit

Permalink
[ci] rspec: Add routing tests global_command_* actions of source cont…
Browse files Browse the repository at this point in the history
…roller
  • Loading branch information
bgeuken committed Oct 18, 2016
1 parent e7b0d31 commit a3f52f6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/api/spec/routing/api_matcher_spec.rb
Expand Up @@ -27,4 +27,24 @@
file: 'file'
)
end

it 'routes requests to global_command_* correctly' do
expect(post('/source?cmd=orderkiwirepos')).to route_to(
controller: 'source',
action: 'global_command_orderkiwirepos',
cmd: 'orderkiwirepos'
)

expect(post('/source?cmd=branch')).to route_to(
controller: 'source',
action: 'global_command_branch',
cmd: 'branch'
)

expect(post('/source?cmd=createmaintenanceincident')).to route_to(
controller: 'source',
action: 'global_command_createmaintenanceincident',
cmd: 'createmaintenanceincident'
)
end
end

0 comments on commit a3f52f6

Please sign in to comment.