Commit Graph

16 Commits

Author SHA1 Message Date
Tom Longhurst
cd1835326b Fix xUnit Warnings (#2906)
* Fix xUnit Warnings

* Fix

* Fix formatting in AsyncPaginationExtensionGenerator.cs

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2024-04-15 13:19:26 -07:00
notauserx
891015c39f update models with updated permission enum (#2633)
* update models with updated permission enum

* add suppress message attribute

* update integration tests

* refactor: new and legacy update teams endpint

* refactor: add new delete team endpoint

* use TeamPermission on NewTeam

* use updated delete on team context dispose

* add permission enum for team response object

* refactor: remove legacy suffix from method names

* introduce permissions object on Team

* refactor: rename enum to TeamRepositoryPermission

* fix formatting

* change Permission to string to match api specs

* add TeamRepository

* add CheckTeamPermission endpoint support

* fix convention tests

* update comments on TeamRepository props

* add two new endpoints in TeamsClient

* refactor: rename ApiUrl for TeamPermission

* fix test

* implement methods for new endpoints

* add the integration tests

* fix spelling

* update comments

* refactor: rename method name

* fix: add end tag for remarks

* refactor: remove unused method param

* fix docstring comment

* the unit tests are in finally

* add docs for teams api

* split CheckTeamPermissions into two methods

* Update ObservableTeamsClientTests.cs based on review

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* add cref to legacy update and delete endpoints

* remove editorconfig file

* Update Octokit.Tests/Clients/TeamsClientTests.cs

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

* remove unused line

* rename variable based on review

* rename prop to match constructor param

* add comment to explain TeamPermission enum values on update

Co-authored-by: notauserx <notauserx@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-01-20 10:48:00 -08:00
Chris Simpson
8b5a7fceaf feat: Fixing master > main in integration tests (#2489) 2022-07-20 17:17:10 -05:00
Brendan Forster
45bc5eced7 autofix tests based on feedback from xunit analyzers (#1997) 2019-09-16 19:46:40 -03:00
Ryan Gribble
a432b15dce Fix ThrowsAsync tests that were not being awaited (#1838)
* Fix ThrowsAsync tests that were not being awaited

* fix for consistency
2018-07-02 23:05:59 +10:00
Ryan Gribble
e93646c9f1 Implement Nested Teams preview API changes (#1682)
* Add new AcceptsHeader
add Parent field to Team
add ParentId field to NewTeam and UpdateTeam
update Create Edit and Delete Team methods to use preview header

* Implement new API call GetAllChildTeams()

* Implement GetAllChildTeams for ObservableClient

* add integration test for observable client

* Add pagination tests for GetAllChildTeams

* Add NestedTeams preview header to all the API calls that use it

* Update tests for accepts header

* Add accepts header to observable client calls

* Fix DELETE implementation to use correct overload

* Fix tests - parent and child teams must be visibility Closed whereas the default if not specified is Private

* make sure all tests are flagged as [OrganizationTest]

* Make sure Update tests change the parent of the team

* Update new methods with NesterTeams preview API header and adjust tests
2017-10-04 16:21:42 +10:00
Ryan Gribble
da0c7a5785 Implement Team Membership changes (#1670)
* Fixup TeamContext helper name

* Implement overload for GetAllMembers to take request parameter

* Update tests

* Implement Obersvable client changes

* Observable tests

* Implement AddOrEditMembership function returning a new response model, and obsolete the old AddMembership function returning an enum

* Implement GetMembershipDetails function returning new TeamMembershipDetails response model, and obsolete the old GetMembership function returning an enum

* Clarify that an exception is thrown when not a member

* Add integration tests for AddOrEditMembership and GetMembershipDetails

* fixup exception test for observable client

* Update wording of obsolete message
2017-09-26 21:37:43 +10:00
Henrik Andersson
7c170213fd List pending organization / team invitations (#1640)
* Add methods for listing pending organization invites

* Add unit/integration tests

* Add methods for getting all pending invites for a team

* Add unit/integration tests

* 🔥 whitespace 🔥

* Move new enum to it's own correct file and location

* Invite(s) -> Invitation(s)

* Add helper functions for adding invitations and cleaning the invitations up at the end of the test

* Add methods with ApiOptions

* Fix helper methods for adding/removing invitations

* Forgot to actually pass in the ApiOptions to the API call

* Add tests for new ApiOptions methods

* tweak integration tests

* Update outside collaborator tests to use [OrganizationTest] attribute for consistency

* Update test accounts used

* use octokitnet-test2 account now it has 2FA turned on
2017-08-14 16:52:53 +10:00
Ryan Gribble
d02007d2b6 Permissions attribute was already present on Repository
Ensure Teams.GetAllRepositories() calls pass the preview header and add integration tests to assert the permissions property is populated
2016-06-04 23:40:05 +10:00
Devesh Khandelwal
27d6e3bfc9 Tests added. 2016-03-30 20:56:33 +05:30
Devesh Khandelwal
486e315c02 Add ApiOptions overload to Reactive Teams client. 2016-03-23 14:57:50 +05:30
Henrik Andersson
189ae42c3a Update tests 2015-03-24 00:12:54 +10:00
Brendan Forster
60e3c9a675 tidy up some using statements 2015-01-04 10:03:47 +09:30
Brendan Forster
28e8372922 extract helper method for setting up GitHubClient 2015-01-04 10:03:45 +09:30
Brendan Forster
491e54d26e the other tests no wpass 2014-12-17 20:16:02 +09:30
Daniel Cazzulino
6b15848e58 Added tests for the observable teams client. 2014-04-22 18:38:41 -03:00