Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/fbe/fake_octokit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ def repositories(_user = nil)

# Lists organization repositories, including private ones when the token has access.
#
# @param [String] _org The organization name (ignored in mock)
# @param [String] org The organization name, the owner of every repository listed
# @param [Hash] _options Filters such as +type:+ (e.g. 'all', 'private', 'public')
# @return [Array<Hash>] Array of repository hashes
# @example
# client.organization_repositories('zerocracy', type: 'all')
# # => [{:id=>123, :full_name=>"yegor256/judges", ...}, ...]
def organization_repositories(_org, _options = {})
# # => [{:id=>123, :full_name=>"zerocracy/judges", ...}, ...]
def organization_repositories(org, _options = {})
[
repository('yegor256/judges'),
repository('yegor256/factbase')
repository("#{org}/judges"),
repository("#{org}/factbase")
]
end

Expand Down
5 changes: 5 additions & 0 deletions test/fbe/test_unmask_repos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,9 @@ def test_live_usage
refute_includes(list, 'zerocracy/judges-action')
refute_includes(list, 'zerocracy/datum')
end

def test_unmasks_every_repository_of_a_fake_organization
opts = Judges::Options.new({ 'testing' => true, 'repositories' => 'zerocracy/*' })
assert_equal(%w[zerocracy/factbase zerocracy/judges], Fbe.unmask_repos(options: opts, global: {}, loog: Loog::NULL).sort)
end
end
Loading