diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-01-17 20:41:50 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-01-24 13:33:23 +0100 |
commit | ab39504aa7c1963169f04e750b7a458db9d1e5ab (patch) | |
tree | 931d99cafad7c4914ed6d6c606a2aac2859c3068 /spec/features/dummy_spec.rb | |
parent | 4dc42845f2ceadcff76a99908220e61610c5b608 (diff) | |
download | gitlab-ce-winh-api-feature-failure.tar.gz |
Add dummy API delete endpoint with feature specwinh-api-feature-failure
Diffstat (limited to 'spec/features/dummy_spec.rb')
-rw-r--r-- | spec/features/dummy_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/dummy_spec.rb b/spec/features/dummy_spec.rb new file mode 100644 index 00000000000..4ede61cc041 --- /dev/null +++ b/spec/features/dummy_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' +require 'net/http' + +feature 'dummy feature' do + scenario 'deletes something', :js do + visit root_path + + url = URI.parse(evaluate_script('location.origin') + '/api/v4/something') + req = Net::HTTP::Delete.new(url.to_s) + res = Net::HTTP.start(url.host, url.port) {|http| + http.request(req) + } + + puts res.code + puts res.body + end + + scenario 'deletes something with JavaScript', :js do + visit root_path + + url = URI.parse(evaluate_script('location.origin') + '/api/v4/something') + req = Net::HTTP::Delete.new(url.to_s) + res = Net::HTTP.start(url.host, url.port) {|http| + http.request(req) + } + + puts res.code + puts res.body + end +end |