bullet_train-incoming_webhooks 1.4.0 → 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: b16b4cec9369a91a3f5f0930a508943641733fad6add77ef0d2df2cd48ac7e79
4
- data.tar.gz: 39f5732c97a1d78abd95d14df481f3e10b4579812b8e39dbacd8889a78139208
3
+ metadata.gz: 0cc4c6a978176abff5117f2615f4fb5bd4ca87236b670bd35a0261e176fad26c
4
+ data.tar.gz: e53befce42d7de213508182e017bd0a743263003dd07118c47b909836470811e
5
5
  SHA512:
6
- metadata.gz: 0bc8963c2d7016cfbd318c04b2e1add07a211665bc91fa592c1bc079fa4f3bd640d176526d38812dd434c9f94510a5578d7f6670ad95d0c24aec4f028b90425b
7
- data.tar.gz: 027caa71ccaf3528ae44910888dc72c3df6a024fe472cdae944283692d0089701de1c43ddfd7efa64617bbafda4678317f16ddd72e3fb3e4c067797fab29c6d7
6
+ metadata.gz: f3ba8fa8d2faa5d8a185eb7df6235111bab061737ba6074411e76408348003e0987963ba8402c6ea6d9dc047c7e0f9e1c3da471fa800325c2bdcb5e9c37fa3d5
7
+ data.tar.gz: c46320d09741e6631e85f0b741601580c72c1744ee8e1b4716962bb56873ab37c4d06717eff7cb6287f7cd6048c0d56fcd897bc1d976c7d2c1f3a8ee0ba369ee
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module IncomingWebhooks
3
- VERSION = "1.4.0"
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.4.0
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