bullet_train-incoming_webhooks 1.3.25 → 1.4.1

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
  SHA256:
3
- metadata.gz: 4f0126ebf0d44b7d9c90d0074698a9609454d4fe77746cb5b595dd5deae7e1ca
4
- data.tar.gz: 8c8280812a83c759a66c7ae93154a5837dfe8b8b92eb65d58ec7645f6d4566e3
3
+ metadata.gz: 0cc4c6a978176abff5117f2615f4fb5bd4ca87236b670bd35a0261e176fad26c
4
+ data.tar.gz: e53befce42d7de213508182e017bd0a743263003dd07118c47b909836470811e
5
5
  SHA512:
6
- metadata.gz: 3559d3d5d83e653808cfeee0ec8f0bd5d0e3f9846981d47a49653646cda109082938e575e66530c41d3bfefb8c4d0d18a7be1eea02d86eb217f5575b5c4e3a1c
7
- data.tar.gz: f4a9a5be646c4958314b132e2e350d5577bfb4f416c68167ecf806466ec621b49a23c68140b72f4f5d7128dcec8da822d48fc86dc3ae2753ade6044be4a4c189
6
+ metadata.gz: f3ba8fa8d2faa5d8a185eb7df6235111bab061737ba6074411e76408348003e0987963ba8402c6ea6d9dc047c7e0f9e1c3da471fa800325c2bdcb5e9c37fa3d5
7
+ data.tar.gz: c46320d09741e6631e85f0b741601580c72c1744ee8e1b4716962bb56873ab37c4d06717eff7cb6287f7cd6048c0d56fcd897bc1d976c7d2c1f3a8ee0ba369ee
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module IncomingWebhooks
3
- VERSION = "1.3.25"
3
+ VERSION = "1.4.1"
4
4
  end
5
5
  end
@@ -0,0 +1,42 @@
1
+ require "test_helper"
2
+
3
+ class Webhooks::Incoming::BulletTrainWebhooksControllerTest < ActionDispatch::IntegrationTest
4
+ include Devise::Test::IntegrationHelpers
5
+
6
+ def setup
7
+ super
8
+ @user = FactoryBot.create(:onboarded_user)
9
+ @membership = @user.memberships.first
10
+ @team = @user.current_team
11
+ end
12
+
13
+ test "should get incoming webhook" do
14
+ webhook_params = {
15
+ data: {
16
+ data: {
17
+ name: "Test",
18
+ team_id: {
19
+ id: @team.id,
20
+ slug: nil,
21
+ locale: nil,
22
+ time_zone: @team.time_zone,
23
+ created_at: @membership.created_at,
24
+ updated_at: @membership.updated_at,
25
+ being_destroyed: nil,
26
+ },
27
+ description: ""
28
+ },
29
+ event_type: "membership.created",
30
+ subject_type: "Membership"
31
+ },
32
+ verified_at: nil,
33
+ processed_at: nil,
34
+ }
35
+
36
+ post "/webhooks/incoming/bullet_train_webhooks", params: webhook_params.to_json
37
+ assert_equal response.parsed_body, {"status" => "OK"}
38
+
39
+ webhook = Webhooks::Incoming::BulletTrainWebhook.first
40
+ assert_equal webhook.data.to_json, webhook_params.to_json
41
+ end
42
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-incoming_webhooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.25
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-08 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -61,6 +61,7 @@ files:
61
61
  - lib/bullet_train/incoming_webhooks/version.rb
62
62
  - lib/scaffolding/incoming_webhooks_transformer.rb
63
63
  - lib/tasks/bullet_train/incoming_webhooks_tasks.rake
64
+ - test/controllers/webhooks/incoming/bullet_train_webhooks_controller_test.rb
64
65
  homepage: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-incoming_webhooks
65
66
  licenses:
66
67
  - MIT