bullet_train-incoming_webhooks 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b16b4cec9369a91a3f5f0930a508943641733fad6add77ef0d2df2cd48ac7e79
4
- data.tar.gz: 39f5732c97a1d78abd95d14df481f3e10b4579812b8e39dbacd8889a78139208
3
+ metadata.gz: e9dbff6631f90eb9e46c9380b57e280b4c33f16a3c66c8365b1e3733416a8325
4
+ data.tar.gz: cfaba34262767d27ecbad5e8d533955b601a1884a8d8af1054f57f62fe04a60f
5
5
  SHA512:
6
- metadata.gz: 0bc8963c2d7016cfbd318c04b2e1add07a211665bc91fa592c1bc079fa4f3bd640d176526d38812dd434c9f94510a5578d7f6670ad95d0c24aec4f028b90425b
7
- data.tar.gz: 027caa71ccaf3528ae44910888dc72c3df6a024fe472cdae944283692d0089701de1c43ddfd7efa64617bbafda4678317f16ddd72e3fb3e4c067797fab29c6d7
6
+ metadata.gz: '061006468e7079e01a53bba72e9abe7292c5fc0b0385226ca49f2a312877b1273c51c8d0fa7ae3d63603ca4d4d8da03ec5ded685b1736b6238cee7b3af8b53dc'
7
+ data.tar.gz: 879504d02fee4fcde73145b5d39fb51634240dce5feb6287f43391deeb51dc1e9d6049e46b8297ff072690e04ed69758444a0a83e1597d7a5a2f93594d8f74db
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module IncomingWebhooks
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.2"
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.2
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-13 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