Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it 'returns the options field when empty' do
- valid_asset = FactoryGirl.create(:asset)
- asset_mappings = [
- {
- isbn_canonical: valid_asset.isbn_canonical,
- partner_id: partner_id,
- options: {}
- }
- ]
- binding.pry
- post(:create, params: { feature_id: feature.id, asset_mappings: asset_mappings, format: :json })
- response.status.must_equal(200)
- asset_feature = json['asset_features'].first
- asset_feature['id'].wont_be_nil
- asset_feature['feature_id'].must_equal(feature.id)
- asset_feature['asset_id'].must_equal(valid_asset.id)
- asset_feature['partner_id'].must_equal(partner_id)
- asset_feature['options'].must_equal(JSON.parse('{}'))
- end
Add Comment
Please, Sign In to add comment