Skip to content

Commit cf13de2

Browse files
committed
Update tasks specs
1 parent 03fb742 commit cf13de2

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
url,
2525
{},
2626
nil,
27-
{}
27+
{},
28+
{ endpoint: 'tasks.cancel' }
2829
]
2930
end
3031

@@ -42,6 +43,17 @@
4243
'_tasks/foo/_cancel'
4344
end
4445

46+
let(:expected_args) do
47+
[
48+
'POST',
49+
url,
50+
{},
51+
nil,
52+
{},
53+
{ defined_params: { task_id: 'foo' }, endpoint: 'tasks.cancel' }
54+
]
55+
end
56+
4557
it 'performs the request' do
4658
expect(client_double.tasks.cancel(task_id: 'foo')).to be_a Elasticsearch::API::Response
4759
end

elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
'_tasks/foo1',
2626
{},
2727
nil,
28-
{}
28+
{},
29+
{ defined_params: { task_id: 'foo1' }, endpoint: 'tasks.get' }
2930
]
3031
end
3132

elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
url,
2525
{},
2626
nil,
27-
{}
27+
{},
28+
{ endpoint: 'tasks.list' }
2829
]
2930
end
3031

0 commit comments

Comments
 (0)