summaryrefslogtreecommitdiff
path: root/spec/requests/api/runners_spec.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-07 14:50:38 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-09 16:00:24 +0800
commit781d35c191be62366f6c7855f3314a9c371aa0e6 (patch)
tree1b5d1edaed93805cc85ba7cee5e7510da40397ab /spec/requests/api/runners_spec.rb
parent894d22f49a24377aad7e693d0343397bc349e412 (diff)
downloadgitlab-ce-781d35c191be62366f6c7855f3314a9c371aa0e6.tar.gz
Prefer attributes_for_keys so that it ignores nils
Also add a test for setting locked.
Diffstat (limited to 'spec/requests/api/runners_spec.rb')
-rw-r--r--spec/requests/api/runners_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 73ae8ef631c..f4f9c417bbb 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -187,14 +187,16 @@ describe API::Runners, api: true do
update_runner(shared_runner.id, admin, description: "#{description}_updated",
active: !active,
tag_list: ['ruby2.1', 'pgsql', 'mysql'],
- run_untagged: 'false')
+ run_untagged: 'false',
+ locked: 'true')
shared_runner.reload
expect(response.status).to eq(200)
expect(shared_runner.description).to eq("#{description}_updated")
expect(shared_runner.active).to eq(!active)
expect(shared_runner.tag_list).to include('ruby2.1', 'pgsql', 'mysql')
- expect(shared_runner.run_untagged?).to be false
+ expect(shared_runner.run_untagged?).to be(false)
+ expect(shared_runner.locked?).to be(true)
end
end