diff --git a/.all-contributorsrc b/.all-contributorsrc index a8d7901..a13b691 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -41,7 +41,10 @@ "profile": "https://github.com/Elleo", "contributions": [ "ideas", - "content" + "content", + "code", + "bug", + "test" ] } ], diff --git a/README.md b/README.md index 53f948d..4da7653 100644 --- a/README.md +++ b/README.md @@ -536,7 +536,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d KATO, Shinya / 加藤 真也
KATO, Shinya / 加藤 真也

💻 📖 🎨 💡 🔍 🤔 🚧 🛡️ ⚠️ Mark O'Sullivan
Mark O'Sullivan

📖 🤔 💬 - Mike Sheldon
Mike Sheldon

🤔 🖋 + Mike Sheldon
Mike Sheldon

🤔 🖋 💻 🐛 ⚠️ diff --git a/lib/src/service/v1/apps/apps_v1_service.dart b/lib/src/service/v1/apps/apps_v1_service.dart index 303fe80..14a235c 100644 --- a/lib/src/service/v1/apps/apps_v1_service.dart +++ b/lib/src/service/v1/apps/apps_v1_service.dart @@ -120,7 +120,7 @@ class _AppsV1Service extends BaseService implements AppsV1Service { body: { 'client_name': clientName, 'redirect_uris': redirectUri, - 'scopes': scopes?.map((e) => e.value).toList(), + 'scopes': scopes?.map((e) => e.value).join(" "), 'website': websiteUrl, }, checkEntity: true, diff --git a/test/src/service/v1/apps/apps_v1_service_test.dart b/test/src/service/v1/apps/apps_v1_service_test.dart index 56207f7..90f4eb0 100644 --- a/test/src/service/v1/apps/apps_v1_service_test.dart +++ b/test/src/service/v1/apps/apps_v1_service_test.dart @@ -42,6 +42,29 @@ void main() { expect(response.data, isA()); }); + test('multiple scopes', () async { + final appsService = AppsV1Service( + instance: 'test', + context: context.buildPostStub( + 'test', + UserContext.anonymousOnly, + '/api/v1/apps', + 'test/src/service/v1/apps/data/create_application.json', + ), + ); + + final response = await appsService.createApplication( + clientName: 'test', + redirectUri: 'https://test//:oauth', + scopes: [Scope.read, Scope.write, Scope.push], + websiteUrl: 'https://shinyakato.dev', + ); + + expect(response, isA()); + expect(response.rateLimit, isA()); + expect(response.data, isA()); + }); + test('when unauthorized', () async { final appsService = AppsV1Service( instance: 'test',