Skip to content

Commit

Permalink
Merge pull request #1223 from SUSE/serializer-product-extensions-cloud
Browse files Browse the repository at this point in the history
Update the product serializer
  • Loading branch information
felixsch authored Sep 4, 2024
2 parents 5e9e61f + c2f30af commit 3d2197a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/serializers/v3/product_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ def eula_url
end

def free
# Everything is free on RMT :-)
# Everything is free on RMT :-) outside of the Public Cloud (i.e. LTSS)
# Otherwise Yast and SUSEConnect will request a regcode when activating an extension
# FIXME
return object.free if defined?(SccProxy::Engine) && object.extension?

true
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@
context 'when no regcode is provided' do
it 'activates the product' do
data = JSON.parse(response.body)
expect(data['product']['free']).to eq(false)
expect(data['id']).to eq(product.id)
end
end
Expand Down

0 comments on commit 3d2197a

Please sign in to comment.