Skip to content

Commit 290e0b0

Browse files
authored
Merge pull request #672 from ruby-oauth/specs
2 parents 9c20782 + 4a13c92 commit 290e0b0

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

.rubocop_gradual.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"lib/oauth2/response.rb:2054901929": [
2222
[53, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427]
2323
],
24-
"spec/oauth2/access_token_spec.rb:373808463": [
24+
"spec/oauth2/access_token_spec.rb:3464059918": [
2525
[3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547],
26-
[809, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088],
27-
[879, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639],
28-
[883, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967]
26+
[824, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088],
27+
[894, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639],
28+
[898, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967]
2929
],
3030
"spec/oauth2/authenticator_spec.rb:853320290": [
3131
[3, 1, 36, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/authenticator*_spec.rb`.", 819808017],

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ Please file a bug if you notice a violation of semantic versioning.
1818

1919
## [Unreleased]
2020
### Added
21+
- [gh!671][gh!671] - Complete documentation example for Instagram by @pboling
2122
- .env.local.example for contributor happiness
2223
- note lack of builds for JRuby 9.2, 9.3 & Truffleruby 22.3, 23.0
2324
- [actions/runner - issues/2347][GHA-continue-on-error-ui]
2425
- [community/discussions/15452][GHA-allow-failure]
2526
- [gh!670][gh!670] - AccessToken: verb-dependent token transmission mode by @mrj
2627
- e.g., Instagram GET=:query, POST/DELETE=:header
2728
### Changed
28-
- [gh!669][gh!669] - Upgrade to kettle-dev v1.1.9
29+
- [gh!669][gh!669] - Upgrade to kettle-dev v1.1.9 by @pboling
2930
### Deprecated
3031
### Removed
3132
### Fixed
@@ -35,6 +36,7 @@ Please file a bug if you notice a violation of semantic versioning.
3536

3637
[gh!669]: https://github.com/ruby-oauth/oauth2/pull/669
3738
[gh!670]: https://github.com/ruby-oauth/oauth2/pull/670
39+
[gh!671]: https://github.com/ruby-oauth/oauth2/pull/671
3840
[GHA-continue-on-error-ui]: https://github.com/actions/runner/issues/2347
3941
[GHA-allow-failure]: https://github.com/orgs/community/discussions/15452
4042

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
⭐️ including OAuth 2.1 draft spec & OpenID Connect (OIDC)
1313

14-
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🔑codecovi]][🔑codecov] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![QLTY Test Coverage][🔑qlty-covi]][🔑qlty-cov] [![QLTY Maintainability][🔑qlty-mnti]][🔑qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL]
14+
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![QLTY Test Coverage][🔑qlty-covi]][🔑qlty-cov] [![QLTY Maintainability][🔑qlty-mnti]][🔑qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL]
1515

1616
If ☝️ `ci_badges.map(&:color).detect { it != "green"}` [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
1717

spec/oauth2/access_token_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,21 @@ def assert_initialized_token(target)
429429
expect(subject.__send__(verb, "/token/#{mode.call(verb)}").body).to include(token)
430430
end
431431
end
432+
433+
context "when invalid" do
434+
subject(:invalid_target) { target.__send__(http_verb, "/token/#{mode.call(http_verb)}") }
435+
436+
let(:http_verb) { :get }
437+
let(:mode) do
438+
lambda do |_verb|
439+
"foobar"
440+
end
441+
end
442+
443+
it "correctly handles an invalid mode by raising an error" do
444+
block_is_expected.to raise_error("invalid :mode option of foobar")
445+
end
446+
end
432447
end
433448

434449
context "with client.options[:raise_errors] = false" do

0 commit comments

Comments
 (0)