fake_fb_marketing_api 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4654c02b8ec4722d2118c5e5a89e625ee7c756d
4
- data.tar.gz: 42a75d177ab63ee8a357d109a7f9ea14d725fbbb
3
+ metadata.gz: 99afb79bf47f9427e52842be802807c88d9dc32a
4
+ data.tar.gz: 29bb8e9c56bfbfba455180e48e153549b8507929
5
5
  SHA512:
6
- metadata.gz: 88a19fffccb5aa8d97a100799b0bcefeca34d86629f8dddebb747e6cf5c20d07e312752fc12bcd5011b5bd6d178e0c7f5a69abca468e6fab6dcd25e3a47f163f
7
- data.tar.gz: 37f01f201931f493c92b83b5cb7837f76f925503936983488da3c427c3f00472759d15f9ef5baae252911aebbcd45a290f3a48ae5c27470a68a1511584aa3ffb
6
+ metadata.gz: a3dd5717991fc14d3f5157add3ece91a4e433f3573e843053c6c511fa816f0e1b49da4e2a2a046c2d6b9e4dec1de5e051d345a87c9b8dcf20cab92b4e565ef62
7
+ data.tar.gz: e1a66ed121049394e971660e376893924cd4c201cb42e9b7e5818835ce8b2e6deb8769faa805c83e077ba7d24ea577d87084e523ac149778a5704c693ec9f21d
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FakeFbMarketingApi
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
@@ -79,6 +79,10 @@ module FakeFbMarketingApi
79
79
  {
80
80
  id: ENV['CONVERSIONS_FUNDRAISE_CAMPAIGN_ID']
81
81
  }.to_json
82
+ when 'CONVERSIONS'
83
+ {
84
+ id: ENV['CONVERSIONS_CAMPAIGN_ID']
85
+ }.to_json
82
86
  end
83
87
  end
84
88
 
@@ -11,6 +11,7 @@ RSpec.describe FakeFbMarketingApi::Application do
11
11
  before { ENV['BRAND_AWARENESS_CAMPAIGN_ID'] = Faker::Number.number(10) }
12
12
  before { ENV['LINK_CLICKS_CAMPAIGN_ID'] = Faker::Number.number(10) }
13
13
  before { ENV['VIDEO_VIEWS_CAMPAIGN_ID'] = Faker::Number.number(10) }
14
+ before { ENV['CONVERSIONS_CAMPAIGN_ID'] = Faker::Number.number(10) }
14
15
  before { ENV['REACH_CAMPAIGN_ID'] = Faker::Number.number(10) }
15
16
  before { ENV['POST_ENGAGEMENT_CAMPAIGN_ID'] = Faker::Number.number(10) }
16
17
  before { ENV['PAGE_LIKES_CAMPAIGN_ID'] = Faker::Number.number(10) }
@@ -188,6 +189,14 @@ RSpec.describe FakeFbMarketingApi::Application do
188
189
 
189
190
  expect(campaign).to eq 'id' => ENV['PAGE_LIKES_CAMPAIGN_ID']
190
191
  end
192
+
193
+ it 'works for conversions' do
194
+ objective = 'CONVERSIONS'
195
+
196
+ campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
197
+
198
+ expect(campaign).to eq 'id' => ENV['CONVERSIONS_CAMPAIGN_ID']
199
+ end
191
200
  end
192
201
 
193
202
  describe 'GET /:ad_account_id/campaigns' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_fb_marketing_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Menne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-25 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler