Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Also pass akid to the AK worker...
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuuleh committed Aug 22, 2016
1 parent aafdc92 commit f02c65e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/controllers/api/stateless/members_controller.rb
Expand Up @@ -24,6 +24,7 @@ def update_on_ak(member)
ChampaignQueue.push(
type: 'update_member',
params: {
akid: member.actionkit_user_id,
email: member.email,
first_name: member.first_name,
last_name: member.last_name,
Expand Down
9 changes: 3 additions & 6 deletions spec/requests/api/stateless/members_spec.rb
Expand Up @@ -3,12 +3,8 @@
describe 'API::Stateless Members' do
include Requests::JsonHelpers
include AuthToken
let!(:member) { create(:member, first_name: 'Harriet', last_name: 'Tubman', email: 'test@example.com') }
let!(:customer) { create(:payment_braintree_customer, member: member) }
let!(:method_a) { create(:braintree_payment_method, customer: customer) }
let!(:method_b) { create(:braintree_payment_method, customer: customer) }
let!(:subscription_a) { create(:payment_braintree_subscription, customer: customer) }
let!(:transaction_a) { create(:payment_braintree_transaction, subscription: subscription_a, customer: customer)}
let!(:member) { create(:member, first_name: 'Harriet', last_name: 'Tubman', email: 'test@example.com', actionkit_user_id: '8244194') }
let!(:other_member) { create(:member, first_name: 'Other', last_name: 'User', email: 'other_member@example.com')}

before :each do
member.create_authentication(password: 'password')
Expand Down Expand Up @@ -77,6 +73,7 @@ def auth_headers
expect(ChampaignQueue).to receive(:push).with({
type: 'update_member',
params: {
akid: member.actionkit_user_id,
email: params[:member][:email],
first_name: params[:member][:first_name],
last_name: params[:member][:last_name],
Expand Down

0 comments on commit f02c65e

Please sign in to comment.