Skip to content

Commit

Permalink
[spaceship] Update Model: beta_tester (#21799)
Browse files Browse the repository at this point in the history
* Update Model: beta_tester

* Update Model: beta_tester & spec test

* Update beta_tester.rb - adding fields

* Update beta_tester_spec.rb - adjusting tests

---------

Co-authored-by: Jerome Lacoste <jerome.lacoste@gmail.com>
  • Loading branch information
mlch911 and lacostej committed Feb 26, 2024
1 parent cdc2471 commit 385a15f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
32 changes: 30 additions & 2 deletions spaceship/lib/spaceship/connect_api/models/beta_tester.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ class BetaTester
attr_accessor :last_name
attr_accessor :email
attr_accessor :invite_type
attr_accessor :invitation
attr_accessor :beta_tester_state
attr_accessor :is_deleted
attr_accessor :last_modified_date
attr_accessor :installed_cf_bundle_short_version_string
attr_accessor :installed_cf_bundle_version
attr_accessor :remove_after_date
attr_accessor :installed_device
attr_accessor :installed_os_version
attr_accessor :number_of_installed_devices
attr_accessor :latest_expiring_cf_bundle_short_version_string
attr_accessor :latest_expiring_cf_bundle_version_string
attr_accessor :installed_device_platform
attr_accessor :latest_installed_device
attr_accessor :latest_installed_os_version
attr_accessor :latest_installed_device_platform

attr_accessor :apps
attr_accessor :beta_groups
Expand All @@ -20,7 +34,21 @@ class BetaTester
"lastName" => "last_name",
"email" => "email",
"inviteType" => "invite_type",
"invitation" => "invitation",
"betaTesterState" => "beta_tester_state",
"isDeleted" => "is_deleted",
"lastModifiedDate" => "last_modified_date",
"installedCfBundleShortVersionString" => "installed_cf_bundle_short_version_string",
"installedCfBundleVersion" => "installed_cf_bundle_version",
"removeAfterDate" => "remove_after_date",
"installedDevice" => "installed_device",
"installedOsVersion" => "installed_os_version",
"numberOfInstalledDevices" => "number_of_installed_devices",
"latestExpiringCfBundleShortVersionString" => "latest_expiring_cf_bundle_short_version_string",
"latestExpiringCfBundleVersionString" => "latest_expiring_cf_bundle_version_string",
"installedDevicePlatform" => "installed_device_platform",
"latestInstalledDevice" => "latest_installed_device",
"latestInstalledOsVersion" => "latest_installed_os_version",
"latestInstalledDevicePlatform" => "latest_installed_device_platform",

"apps" => "apps",
"betaGroups" => "beta_groups",
Expand Down
22 changes: 21 additions & 1 deletion spaceship/spec/connect_api/fixtures/testflight/beta_testers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,27 @@
"lastName" : "AreCute",
"email" : "email@email.com",
"inviteType" : "EMAIL",
"invitation" : null
"isDeleted": false,
"betaTesterState": "INSTALLED",
"lastModifiedDate": "2024-01-21T20:52:18.921-08:00",
"installedCfBundleShortVersionString": "1.3.300",
"installedCfBundleVersion": "1113",
"removeAfterDate": "2024-04-20T00:00:00-07:00",
"latestExpiringCfBundleShortVersionString": "1.3.300",
"latestExpiringCfBundleVersionString": "1113",
"installedDevice": "iPhone14_7",
"installedOsVersion": "17.2.1",
"installedDevicePlatform": "IOS",
"latestInstalledDevice": "iPhone14_7",
"latestInstalledOsVersion": "17.2.1",
"latestInstalledDevicePlatform": "IOS",
"numberOfInstalledDevices": 1.0,
"appDevices": [{
"model": "iPhone14_7",
"platform": "IOS",
"osVersion": "17.2.1",
"appBuildVersion": "1.3.300 (1113)"
}]
},
"relationships" : {
"apps" : {
Expand Down
16 changes: 15 additions & 1 deletion spaceship/spec/connect_api/models/beta_tester_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@
expect(model.last_name).to eq("AreCute")
expect(model.email).to eq("email@email.com")
expect(model.invite_type).to eq("EMAIL")
expect(model.invitation).to eq(nil)
expect(model.beta_tester_state).to eq("INSTALLED")
expect(model.is_deleted).to eq(false)
expect(model.last_modified_date).to eq("2024-01-21T20:52:18.921-08:00")
expect(model.installed_cf_bundle_short_version_string).to eq("1.3.300")
expect(model.installed_cf_bundle_version).to eq("1113")
expect(model.remove_after_date).to eq("2024-04-20T00:00:00-07:00")
expect(model.installed_device).to eq("iPhone14_7")
expect(model.installed_os_version).to eq("17.2.1")
expect(model.number_of_installed_devices).to eq(1.0)
expect(model.latest_expiring_cf_bundle_short_version_string).to eq("1.3.300")
expect(model.latest_expiring_cf_bundle_version_string).to eq("1113")
expect(model.installed_device_platform).to eq("IOS")
expect(model.latest_installed_device).to eq("iPhone14_7")
expect(model.latest_installed_os_version).to eq("17.2.1")
expect(model.latest_installed_device_platform).to eq("IOS")
end
end
end

0 comments on commit 385a15f

Please sign in to comment.