Skip to content

Commit

Permalink
[api] simple smoke test that product converter errors are visible
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Dec 7, 2012
1 parent 3df6d11 commit bf9daed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<group name="obs" version="11" release="0.1">
<pattern ordernumber="2030">
<category>OBS Extension</category>
<description>Simple OBS list</description>
<icon>OBS</icon>
<summary>Blah
Blub</summary>
<visible>true</visible>
<relationships>
<pattern name="OBS" relationship="requires" />
</relationships>
</pattern>
<packagelist>
<package name="obs-server" supportstatus="ILLEGAL" />
</packagelist>
</group>
7 changes: 7 additions & 0 deletions src/api/test/functional/product_test.rb
Expand Up @@ -42,6 +42,13 @@ def test_simple_product_file
assert_response :success
assert_match(/^obs-server: \+Kwd:\\nsupport_l3\\n-Kwd:/, @response.body)

# invalid uploads
raw_put "/source/home:tom:temporary/_product/obs.group",
File.open("#{Rails.root}/test/fixtures/backend/source/simple_product/INVALID_obs.group").read()
assert_response 400
assert_xml_tag :tag => "status", :attributes => { :code => '400', :origin => 'backend' }
assert_xml_tag :tag => "summary", :content => "Illegal support key ILLEGAL for obs-server"

delete "/source/home:tom:temporary"
assert_response :success
end
Expand Down

0 comments on commit bf9daed

Please sign in to comment.