source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | config.ru | Ruby | mit | 298 | master | 605 | $: << 'lib'
# Make sure we set that before everything
ENV['RACK_ENV'] ||= ENV['RAILS_ENV'] || ENV['ENV']
ENV['RAILS_ENV'] = ENV['RACK_ENV']
$stdout.sync = true
require 'travis/api/app'
require 'core_ext/module/load_constants'
models = Travis::Model.constants.map(&:to_s)
only = [/^(ActiveRecord|ActiveModel|Travis... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | Rakefile | Ruby | mit | 298 | master | 1,084 | require "knapsack"
Dir.glob('lib/tasks/*.rake').each { |r| import r }
namespace :db do
env = ENV['ENV'] || 'test'
file = 'db/structure.sql'
desc "Fetch DB schema dump"
task :fetch_schema do
if branch = ENV['TRAVIS_MIGRATIONS_BRANCH'] and !branch.empty?
$stderr.puts 'Warning: travis-migrations branc... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | script/repos_stats.rb | Ruby | mit | 298 | master | 788 | $stdout.sync = true
Repository.where('last_build_finished_at is not null').count(group: :github_language)
rates = Repository.where('last_build_finished_at is not null').count(group: [:last_build_state, :github_language])
groups = rates.group_by { |k, v| k[1] }
stats = groups.map do |lang, values|
values.inject({ "l... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/spec_helper.rb | Ruby | mit | 298 | master | 3,456 | # require 'knapsack'
#
# Knapsack::Adapters::RspecAdapter.bind
$: << 'lib'
ENV['RACK_ENV'] = ENV['RAILS_ENV'] = ENV['ENV'] = 'test'
ENV['GDPR_ENABLED'] = 'true'
require 'logger'
require 'support/coverage' unless ENV['SKIP_COVERAGE']
require 'rspec'
require 'rspec/its'
require 'database_cleaner'
require 'gh'
require... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/support.rb | Ruby | mit | 298 | master | 484 | require 'support/matchers'
require 'support/payloads'
module Support
autoload :ActiveRecord, 'support/active_record'
autoload :Formats, 'support/formats'
autoload :GCS, 'support/gcs'
autoload :Log, 'support/log'
autoload :Mocks, 'support/mocks'
autoload :Notification... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services_spec.rb | Ruby | mit | 298 | master | 1,566 | module Test
module Services
extend Travis::Services::Registry
class DoStuff < Travis::Services::Base
attr_reader :current_user, :params
def initialize(current_user, params)
@current_user, @params = current_user, params
end
end
end
class Foo
include Travis::Services::He... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_request_spec.rb | Ruby | mit | 298 | master | 3,579 | describe Travis::Services::FindRequest do
let(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let!(:request) { FactoryBot.create(:request, :repository => repo) }
let(:params) { { :id => request.id } }
let(:service) { described_class.new(double('user'), params) ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/assembla_notify_service_spec.rb | Ruby | mit | 298 | master | 3,478 | require 'spec_helper'
require 'travis/services/assembla_notify_service'
RSpec.describe Travis::Services::AssemblaNotifyService do
let(:payload) { { 'action' => 'restrict', 'object' => 'tool', 'id' => '12345' } }
let(:service) { described_class.new(payload) }
let(:vcs_repository) { instance_double(Travis::RemoteV... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/sync_user_spec.rb | Ruby | mit | 298 | master | 1,059 | describe Travis::Services::SyncUser do
include Travis::Testing::Stubs
let(:publisher) { double('publisher', :publish => true) }
let(:service) { described_class.new(user, {}) }
describe 'given the user is not currently syncing' do
before :each do
allow(user).to receive(:update_column)
allow(u... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_user_accounts_spec.rb | Ruby | mit | 298 | master | 2,423 | describe Travis::Services::FindUserAccounts do
let!(:sven) { FactoryBot.create(:user, id: 9999999, :login => 'sven') }
let!(:travis) { FactoryBot.create(:org, :login => 'travis-ci') }
let!(:sinatra) { FactoryBot.create(:org, :login => 'sinatra') }
let!(:non_user_org) { FactoryBot.create(:org, :login => 'tra... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_branch_spec.rb | Ruby | mit | 298 | master | 1,099 | describe Travis::Services::FindBranch do
let(:user) { FactoryBot.create(:user) }
let(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let!(:build) { FactoryBot.create(:build, :repository => repo, :state => :finished) }
let(:service) { described_class.new(user,... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_jobs_spec.rb | Ruby | mit | 298 | master | 6,404 | describe Travis::Services::FindJobs do
let(:repo) { FactoryBot.create(:repository) }
let!(:job) { FactoryBot.create(:test, :repository => repo, :state => :created, :queue => 'builds.linux') }
let(:service) { described_class.new(double('user'), params) }
attr_reader :params
describe 'run' do
it 'fi... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/update_hook_spec.rb | Ruby | mit | 298 | master | 2,717 | describe Travis::Services::UpdateHook do
include Travis::Testing::Stubs
let(:service) { described_class.new(user, params) }
let(:params) { { id: repo.id, active: true } }
before :each do
allow(repo).to receive(:update_column)
allow(service).to receive(:run_service)
allow(user).to receive(:service... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_build_spec.rb | Ruby | mit | 298 | master | 4,746 | describe Travis::Services::FindBuild do
let(:repo) { FactoryBot.create(:repository, owner_name: 'travis-ci', name: 'travis-core') }
let!(:build) { FactoryBot.create(:build, repository: repo, state: :finished, number: 1, config: {'sudo' => false}) }
let(:params) { { id: build.id } }
let(:service) { describe... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_repo_settings_spec.rb | Ruby | mit | 298 | master | 1,068 | describe Travis::Services::FindRepoSettings do
let(:repo) { FactoryBot.create(:repository_without_last_build) }
let(:params) { { id: repo.id } }
let(:user) { FactoryBot.create(:user) }
let(:service) { described_class.new(user, params) }
before do
repo.settings.merge('build_pushes' => false)
re... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_repo_key_spec.rb | Ruby | mit | 298 | master | 844 | describe Travis::Services::FindRepoKey do
let(:user) { FactoryBot.create(:user) }
let!(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let(:service) { described_class.new(user, params) }
before { repo.regenerate_key! }
attr_reader :params
describe 'run'... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_requests_spec.rb | Ruby | mit | 298 | master | 5,880 | describe Travis::Services::FindRequests do
let(:user) { FactoryBot.create(:user) }
let(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let!(:request) { FactoryBot.create(:request, :repository => repo) }
let!(:newer_request) { FactoryBot.create(:request, :repositor... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/update_user_spec.rb | Ruby | mit | 298 | master | 514 | describe Travis::Services::UpdateUser do
include Travis::Testing::Stubs
let(:service) { described_class.new(user, params) }
before :each do
allow(user).to receive(:update!)
end
attr_reader :params
it 'updates the locale if valid' do
@params = { :locale => 'en' }
expect(user).to receive(:up... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_hooks_spec.rb | Ruby | mit | 298 | master | 2,137 | describe Travis::Services::FindHooks do
let(:user) { User.first || FactoryBot.create(:user) }
let(:repo) { FactoryBot.create(:repository) }
let(:push_repo) { FactoryBot.create(:repository, name: 'push-repo') }
let(:service) { described_class.new(user, params) }
before :each do
user.permissions.crea... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/regenerate_repo_key_spec.rb | Ruby | mit | 298 | master | 900 | describe Travis::Services::RegenerateRepoKey do
let(:user) { User.first || FactoryBot.create(:user) }
let!(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let(:service) { described_class.new(user, :id => repo.id) }
before :each do
expect(service).to receiv... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_job_spec.rb | Ruby | mit | 298 | master | 4,293 | describe Travis::Services::FindJob do
let(:repo) { FactoryBot.create(:repository) }
let!(:job) { FactoryBot.create(:test, repository: repo, state: :created, owner_type: 'User', queue: 'builds.linux', config: {'sudo' => false}) }
let(:params) { { id: job.id } }
let(:service) { described_class.new(double('... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_builds_spec.rb | Ruby | mit | 298 | master | 7,599 | describe Travis::Services::FindBuilds do
before { DatabaseCleaner.clean_with :truncation }
let(:user) { FactoryBot.create(:user) }
let(:repo) { FactoryBot.create(:repository_without_last_build, owner_name: 'travis-ci', name: 'travis-core') }
let!(:push) { FactoryBot.create(:build, repository: repo, eve... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_caches_spec.rb | Ruby | mit | 298 | master | 3,095 | describe Travis::Services::FindCaches do
include Support::S3, Support::GCS
let(:user) { User.first || FactoryBot.create(:user) }
let(:service) { described_class.new(user, params) }
let(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core') }
let(:cache_options) {{ s3: { b... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_admin_spec.rb | Ruby | mit | 298 | master | 2,640 | describe Travis::Services::FindAdmin do
include Travis::Testing::Stubs
describe 'find' do
let(:result) { described_class.new(nil, repository: repository).run }
before :each do
allow(User).to receive(:with_permissions).with(:repository_id => repository.id, :admin => true).and_return [user]
end
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_repo_spec.rb | Ruby | mit | 298 | master | 3,580 | describe Travis::Services::FindRepo do
let(:user) { FactoryBot.create(:user) }
let!(:repo) { FactoryBot.create(:repository_without_last_build, :owner => user, :owner_name => 'travis-ci', :name => 'travis-core') }
let(:service) { described_class.new(user, params) }
attr_reader :params
describe 'run' do
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_log_spec.rb | Ruby | mit | 298 | master | 1,273 | describe Travis::Services::FindLog do
let(:params) { {} }
let(:service) { described_class.new(double('user'), params) }
let(:job) { FactoryBot.create(:job) }
describe 'run' do
it 'finds the log with the given id' do
params[:id] = 1
found_by_id = double('found-by-id', job_id: job.id)
remot... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/assembla_user_service_spec.rb | Ruby | mit | 298 | master | 3,055 | require 'spec_helper'
RSpec.describe Travis::Services::AssemblaUserService do
let(:payload) do
{
'id' => '12345',
'name' => 'Test User',
'email' => 'test@example.com',
'login' => 'testuser',
'refresh_token' => 'refresh123',
'space_id' => '67890'
}
end
let(:service) { ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_branches_spec.rb | Ruby | mit | 298 | master | 4,077 | describe Travis::Services::FindBranches do
describe 'on org' do
let(:user) { FactoryBot.create(:user) }
let(:repo) { FactoryBot.create(:repository_without_last_build, :owner_name => 'travis-ci', :name => 'travis-core') }
let!(:build) { FactoryBot.create(:build, :repository => repo, :state => :finis... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/remove_log_spec.rb | Ruby | mit | 298 | master | 4,462 | describe Travis::Services::RemoveLog do
let(:repo) { FactoryBot.create(:repository) }
let(:job) { FactoryBot.create(:test, repository: repo, state: :created) }
let(:user) { FactoryBot.create(:user) }
let(:service) { described_class.new(user, params) }
let(:params) { { id: job.id, reason: 'Because r... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/next_build_number_spec.rb | Ruby | mit | 298 | master | 1,228 | require 'travis/services/next_build_number'
describe Travis::Services::NextBuildNumber do
let(:service) { described_class.new(user, params) }
let!(:user) { FactoryBot.create(:user) }
let(:result) { service.run }
let(:params) { { repository_id: 1234 } }
let(:repo) do
FactoryBot.create(:repository_without_... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/find_repos_spec.rb | Ruby | mit | 298 | master | 6,877 | describe Travis::Services::FindRepos do
before { DatabaseCleaner.clean_with :truncation }
let(:user) { FactoryBot.create(:user) }
let!(:repo) { FactoryBot.create(:repository, :owner_name => 'travis-ci', :name => 'travis-core', :active => true) }
let(:service) { described_class.new(user, params) }
attr_rea... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/services/update_job_spec.rb | Ruby | mit | 298 | master | 6,761 | describe Travis::Services::UpdateJob do
before { DatabaseCleaner.clean_with :truncation }
let(:service) { described_class.new(event: event, data: payload) }
let(:payload) { WORKER_PAYLOADS["job:test:#{event}"].merge('id' => job.id) }
let(:build) { FactoryBot.create(:build, state: :created, started_at: nil, f... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/schedulers/schedule_cron_jobs_spec.rb | Ruby | mit | 298 | master | 2,597 | require "sentry-ruby"
require "travis/api/app/schedulers/schedule_cron_jobs"
describe "ScheduleCronJobs" do
let(:subject) { Travis::Api::App::Schedulers::ScheduleCronJobs.enqueue }
before do
allow(Travis::Api::App::Schedulers::ScheduleCronJobs).to receive(:options).and_return({
strategy: :redis,
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/travis/config_spec.rb | Ruby | mit | 298 | master | 4,901 | require 'spec_helper'
require 'active_support/core_ext/hash/slice'
describe Travis::Config do
# Run examples with a fresh ENV and restore original afterwards
around do |example|
old_env = ENV.to_h
ENV.replace({})
example.run
ENV.replace(old_env)
end
let(:config) { Travis::Config.load(:files, :... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/travis/remote_log_spec.rb | Ruby | mit | 298 | master | 12,794 | require 'travis/remote_log'
describe Travis::RemoteLog do
subject { described_class.new(attrs) }
let(:job_id) { 5 }
let(:attrs) { { id: 4, content: archived_content, job_id: job_id } }
let(:archived_content) { 'hello world' }
before :each do
described_class::Remote.instance_variable_set(:@clients, nil)
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/travis/api/enqueue/services/restart_model_spec.rb | Ruby | mit | 298 | master | 6,410 | describe Travis::Enqueue::Services::RestartModel do
let(:owner) { FactoryBot.create(:user) }
let(:repository) { FactoryBot.create(:repository, owner: owner) }
let(:job) { FactoryBot.create(:job, repository: repository, state: 'canceled') }
let(:user) { FactoryBot.create(:user) }
let(:subscription) { nil }
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/github/oauth_spec.rb | Ruby | mit | 298 | master | 1,734 | describe Travis::Github::Oauth do
let(:user) { FactoryBot.create(:user, github_oauth_token: 'token', github_scopes: scopes) }
describe 'correct_scopes?' do
let(:scopes) { ['public_repo', 'user:email'] }
subject { described_class.correct_scopes?(user) }
it 'accepts correct scopes' do
should eq tr... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/github/services/set_key_spec.rb | Ruby | mit | 298 | master | 2,846 | describe Travis::Github::Services::SetKey do
include Travis::Testing::Stubs
let(:keys_path) { 'repos/travis-ci/travis-core/keys' }
let(:key_path) { "#{keys_path}/1" }
let(:keys) { [{ 'id' => 1, 'key' => SSL_KEYS[:public_base64], '_links' => { 'self' => { 'href' => key_path } } }] }
let(:key) { Ssl... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build_spec.rb | Ruby | mit | 298 | master | 11,515 | describe Build do
before { DatabaseCleaner.clean_with :truncation }
let(:repository) { FactoryBot.create(:repository_without_last_build) }
it 'caches matrix ids' do
build = FactoryBot.create(:build, config: { rvm: ['1.9.3', '2.0.0'] })
expect(build.cached_matrix_ids).to eq(build.matrix_ids)
end
it ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/request_spec.rb | Ruby | mit | 298 | master | 3,987 | describe Request do
let(:owner) { User.new(login: 'travis-ci') }
let(:repo) { Repository.new(owner_name: 'travis-ci', name: 'travis-core', owner: owner) }
let(:commit) { Commit.new(commit: '12345678') }
let(:request) { Request.new(repository: repo, commit: commit, pull_request: pull_re... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/token_spec.rb | Ruby | mit | 298 | master | 299 | describe Token do
it 'generate_token sets the token to a 20 character value' do
expect(Token.new.send(:generate_token).length).to eq(20)
end
it 'does not generate new token on save' do
token = Token.create!
expect {
token.save
}.to_not change { token.token }
end
end |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/url_spec.rb | Ruby | mit | 298 | master | 729 | describe Url do
subject { Url.create(url: "http://example.com") }
describe ".shorten" do
it "creates a new Url object if the url has not been shortened" do
expect { Url.shorten("http://example.com") }.to change(Url, :count).from(0).to(1)
end
it "retrieves a Url which has already been shortened" ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/permission_spec.rb | Ruby | mit | 298 | master | 542 | describe Permission do
describe 'by_roles' do
before :each do
Permission::ROLES.each { |role| Permission.create!(role => true) }
end
it 'returns matching permissions if two roles given as symbols' do
expect(Permission.by_roles([:admin, :pull]).size).to eq(3)
end
it 'returns a single ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/ssl_key_spec.rb | Ruby | mit | 298 | master | 2,094 | describe SslKey do
let(:key) { SslKey.new }
before(:each) do
key.generate_keys
end
it "is a SslKey" do
expect(key).to be_a(SslKey)
end
describe "generate_keys" do
it "generates the public key" do
expect(key.public_key).to be_a(String)
end
it "generates the private key" do
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/encrypted_column_spec.rb | Ruby | mit | 298 | master | 4,160 | class Travis::Model < ActiveRecord::Base
describe EncryptedColumn do
def encode str
Base64.strict_encode64 str
end
let(:options){ { key: 'secret-key' } }
let(:column) { EncryptedColumn.new(options) }
let(:iv) { 'a' * 16 }
let(:aes) { double('aes', :final => '') }
describe '#... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/commit_spec.rb | Ruby | mit | 298 | master | 2,409 | describe Commit do
let(:commit) { Commit.new(:commit => '12345678') }
describe 'pull_request_number' do
context 'when commit is from pull request' do
before { commit.ref = 'refs/pull/180/merge' }
it 'returns pull request\'s number' do
expect(commit.pull_request_number).to eq(180)
end... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/repository_spec.rb | Ruby | mit | 298 | master | 16,361 | describe Repository do
before { DatabaseCleaner.clean_with :truncation }
describe '#last_completed_build' do
let(:repo) { FactoryBot.create(:repository, name: 'foobarbaz') }
let(:build1) { FactoryBot.create(:build, repository: repo, finished_at: 1.hour.ago, state: :passed) }
let(:build2) { FactoryBot... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/broadcast_spec.rb | Ruby | mit | 298 | master | 3,684 | describe Broadcast do
let(:org) { FactoryBot.create(:org) }
let(:repo) { FactoryBot.create(:repository) }
let(:user) { FactoryBot.create(:user) }
before :each do
user.organizations << org
user.repositories << repo
end
describe 'by_user' do
let(:broadcasts) { Broadcast.by_user(user) }
it... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/job_spec.rb | Ruby | mit | 298 | master | 13,723 | describe Job do
describe '.result' do
it 'returns 1 for failed builds' do
job = FactoryBot.build(:test, state: :failed)
expect(job.result).to eq(1)
end
it 'returns 0 for passed builds' do
job = FactoryBot.build(:test, state: :passed)
expect(job.result).to eq(0)
end
end
de... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/organization_spec.rb | Ruby | mit | 298 | master | 869 | describe Organization do
let(:org) { FactoryBot.create(:org, :login => 'travis-organization') }
describe 'educational_org' do
after do
Travis::Features.deactivate_owner(:educational_org, org)
end
it 'returns true if organization is flagged as educational_org' do
Travis::Features.activate_o... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/user_spec.rb | Ruby | mit | 298 | master | 7,419 | describe User do
before { DatabaseCleaner.clean_with :truncation }
let(:user) { FactoryBot.create(:user, :github_oauth_token => 'token') }
let(:payload) { GITHUB_PAYLOADS[:oauth] }
describe 'find_or_create_for_oauth' do
def user(payload)
User.find_or_create_for_oauth(payload)
end
it 'mar... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/job/cleanup_spec.rb | Ruby | mit | 298 | master | 1,301 | # describe Job::Cleanup do
# let(:job) { FactoryBot.create(:test) }
#
# describe 'scopes' do
# let! :jobs do
# [ FactoryBot.create(:test, :state => :created, :created_at => Time.now.utc - Travis.config.jobs.retry.after - 60),
# FactoryBot.create(:test, :state => :started, :created_at => Time.now... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/job/test_spec.rb | Ruby | mit | 298 | master | 3,987 | describe Job::Test do
let(:job) { FactoryBot.create(:test) }
let(:log) { Travis::RemoteLog.new(job_id: job.id) }
before :each do
allow(Travis::Event).to receive(:dispatch)
remote = double('remote')
allow(Travis::RemoteLog::Remote).to receive(:new).and_return(remote)
allow(remote).to receive(:find... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/job/queue_spec.rb | Ruby | mit | 298 | master | 16,806 | describe 'Job::Queue' do
def queue(*args)
Job::Queue.new(*args)
end
let(:the_past) { Time.parse("1982-06-23") }
let(:recently) { 7.days.ago }
before do
Travis.config.queues = [
{ queue: 'builds.rails', slug: 'rails/rails' },
{ queue: 'builds.mac_osx', os: 'osx' },
{ queue: 'builds.... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/config_spec.rb | Ruby | mit | 298 | master | 3,364 | describe Build::Config do
it 'keeps the given env if it is an array' do
config = YAML.load %(
env:
- FOO=foo
- BAR=bar
)
expect(Build::Config.new(config).normalize.slice(:env, :global_env)).to eq({
env: [
'FOO=foo',
'BAR=bar'
]
})
end
# seems odd.... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/matrix_spec.rb | Ruby | mit | 298 | master | 36,114 | describe Build, 'matrix' do
describe :matrix_finished? do
context 'if config[:matrix][:finish_fast] is not set' do
context 'if at least one job has not finished and is not allowed to fail' do
it 'returns false' do
build = FactoryBot.create(:build, config: { rvm: ['1.8.7', '1.9.2'] })
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/result_message_spec.rb | Ruby | mit | 298 | master | 5,209 | describe Build::ResultMessage do
def message(data)
described_class.new(data)
end
describe "short" do
it 'returns :pending if the build is pending' do
data = { state: :created, previous_state: nil }
expect(message(data).short).to eq('Pending')
end
it 'returns :passed if the build has ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/metrics_spec.rb | Ruby | mit | 298 | master | 915 | class BuildMetricsMock
include do
attr_accessor :state, :request
def initialize(request)
@request = request
end
def start(data = {})
self.state = :started
end
def started_at
Time.now
end
end
include Build::Metrics
end
describe Build::Metrics do
let(:request) {... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/states_spec.rb | Ruby | mit | 298 | master | 5,368 | class BuildMock
include Build::States
class << self; def name; 'Build'; end; end
attr_accessor :state, :received_at, :started_at, :finished_at, :duration
def denormalize(*) end
end
describe Build::States do
let(:build) { BuildMock.new }
describe 'events' do
describe 'cancel' do
it 'cancels all t... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/denormalize_spec.rb | Ruby | mit | 298 | master | 1,676 | describe Build, 'denormalization' do
let(:build) { FactoryBot.create(:build, state: :started, duration: 30) }
describe 'on build:started' do
before :each do
build.denormalize(:start)
build.reload
end
it 'denormalizes last_build_id to its repository' do
expect(build.repository.last_bu... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/config/group_spec.rb | Ruby | mit | 298 | master | 582 | require 'travis/model/build/config/group'
describe Build::Config::Group do
subject { described_class.new(config) }
let(:config) { { dist: 'bork' } }
it 'sets group to the default' do
expect(subject.run[:group]).to eql(described_class::DEFAULT_GROUP)
end
context 'with :group' do
let(:config) { { gro... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/config/obfuscate_spec.rb | Ruby | mit | 298 | master | 2,564 | describe Build::Config::Obfuscate do
let(:repo) { FactoryBot.create(:repository) }
let(:build) { Build.new(repository: repo) }
before { repo.regenerate_key! }
it 'normalizes env vars which are hashes to strings' do
encrypted = repo.key.secure.encrypt('BAR=barbaz')
build.config = {
language: 'ru... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/config/matrix_spec.rb | Ruby | mit | 298 | master | 371 | require 'core_ext/hash/deep_symbolize_keys'
describe Build::Config::Matrix do
it 'can handle nil values in exclude matrix' do
expect { Build::Config::Matrix.new(matrix: { exclude: [nil] }).expand }.not_to raise_error
end
it 'can handle list values in exclude matrix' do
expect { Build::Config::Matrix.new... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/build/config/dist_spec.rb | Ruby | mit | 298 | master | 3,556 | require 'travis/model/build/config/dist'
describe Build::Config::Dist do
subject { described_class.new(config, options) }
let(:config) { {} }
let(:options) { {} }
it 'sets dist to the default' do
expect(subject.run[:dist]).to eql(described_class::DEFAULT_DIST)
end
context 'with :dist' do
let(:con... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/user/oauth_spec.rb | Ruby | mit | 298 | master | 822 | describe User::Oauth do
let(:user) { FactoryBot.create(:user, :github_oauth_token => 'token') }
let(:payload) { GITHUB_PAYLOADS[:oauth] }
describe 'find_or_create_by' do
def call(payload)
User::Oauth.find_or_create_by(payload)
end
it 'marks users as recently_signed_up' do
expect(call(... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/repository/settings_spec.rb | Ruby | mit | 298 | master | 4,415 | # encoding: utf-8
describe Repository::Settings do
describe 'env_vars' do
it 'can be filtered to get only public vars' do
settings = Repository::Settings.load(env_vars: [
{ name: 'PUBLIC_VAR', value: 'public var', public: true },
{ name: 'SECRET_VAR', value: 'secret var', public: false }
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/repository/status_image_spec.rb | Ruby | mit | 298 | master | 4,474 | describe Repository::StatusImage do
let(:cache) { double('states cache', fetch: nil, write: nil, fetch_state: nil) }
let!(:request) { FactoryBot.create(:request, event_type: 'push', repository: repo) }
let!(:build) { FactoryBot.create(:build, repository: repo, request: request, state: :passed) }
let(:repo)... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/lib/model/repository/settings/ssh_key_spec.rb | Ruby | mit | 298 | master | 5,417 | # encoding: utf-8
describe Repository::Settings::SshKey do
let(:private_key) {
"-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAuHVhiw/2qaGmIiRbKjO5bZmQI0UEQ1vQVVxujL5SFAUsEB3w
YvcsdK+EDrmFfhrvVde1PnWzuwdq4seftZvTni+5KIjpNJ6/YKfYVUEOQ5ORvuqb
zrYPWzJShXnqvrFpbF82unHs4ceb+XzV/2Tciy/p5Yv535yweLRJKtcwK+ANLz8O
wF+IZf20Stu... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/helpers.rb | Ruby | mit | 298 | master | 3,458 | require 'auth/helpers/faraday'
require 'auth/helpers/rack_test'
require 'active_support/core_ext/hash'
require 'active_support/all'
RSpec.shared_context 'cache setup' do
include Support::S3
before { Travis.config.cache_options = { s3: { bucket_name: '' , access_key_id: '', secret_access_key: ''} } }
before { s3... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/report/table.rb | Ruby | mit | 298 | master | 1,324 | #!/bin/env ruby
require 'csv'
require 'erb'
versions = %w(v2.1 v2 v1)
modes = %w(private public)
visibilities = %w(private public)
contexts = {
with_permission: 'auth/perm',
without_permission: 'auth/no perm',
unauthenticated: 'unauth'
}
csv = File.read(File.expand_path('../auth.csv', __FILE__))
@data = CSV.... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/report/csv_formatter.rb | Ruby | mit | 298 | master | 2,444 | require 'csv'
require 'rspec/core/formatters/base_formatter'
# run auth specs with formatter, skip the first line:
#
# $ bundle exec rspec spec/auth --require ./spec/support/csv_formatter.rb --format CsvFormatter | tail -n +2
class CsvFormatter < RSpec::Core::Formatters::BaseFormatter
COLS = %i(result version mode ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/accounts_spec.rb | Ruby | mit | 298 | master | 1,327 | describe 'v2.1 accounts', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
before { Broadcast.create!(recipient: user) }
describe 'in public mode', mode: :public do
describe 'GET /accounts' do
it(:authenticated) { should auth status: 200, type: :json... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/jobs_spec.rb | Ruby | mit | 298 | master | 7,175 | describe 'v2.1 jobs', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:job) { repo.builds.first.matrix.first }
let(:log) { %({"job_id": #{job.id}, "content": "content"}) }
let :log_from_api d... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/repo_status_spec.rb | Ruby | mit | 298 | master | 26,304 | describe 'v2.1 status', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
before(:all) { SslKey.create(repository_id: 1) }
before { SslKey.update_all(repository_id... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/repos_spec.rb | Ruby | mit | 298 | master | 29,620 | describe 'v2.1 repos', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
before(:all) { SslKey.create(repository_id: 1) }
before { SslKey.update_all(repository_id:... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/ssh_keys_spec.rb | Ruby | mit | 298 | master | 3,129 | describe 'v2.1 settings/ssh_key', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
# before(:all) { SslKey.create(repository_id: 1) }
# before { SslKey.update_all(repository_id: repo.id) }
before d... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/branches_spec.rb | Ruby | mit | 298 | master | 6,401 | describe 'v2.1 branches', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
describe 'in public mode, with a private repo', mode: :public, repo: :private do
desc... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/env_vars_spec.rb | Ruby | mit | 298 | master | 2,924 | describe 'v2.1 settings/env_vars', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
before { repo.settings.tap { |s| s.env_vars.create(name: 'FOO', value: 'foo') && s.save } }
before { stub_request(:... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/logs_spec.rb | Ruby | mit | 298 | master | 3,905 | describe 'v2.1 logs', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
let(:job) { build.matrix.first }
let(:log) { double(id: 1) }
let :log_from_api do
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/switch_spec.rb | Ruby | mit | 298 | master | 490 | describe 'v2.1 switch', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.first }
describe 'by default' do
describe 'GET /repos/%{repo.id}' do
it(:with_permission) { should auth status: 200, type: :json, empty: false }
end
e... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/broadcasts_spec.rb | Ruby | mit | 298 | master | 1,359 | describe 'v2.1 broadcasts', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
before { Broadcast.create!(recipient: user, recipient_type: 'User') }
describe 'in public mode', mode: :public do
describe 'GET /broadcasts' do
it(:authenticated) { should a... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/requests_spec.rb | Ruby | mit | 298 | master | 4,415 | describe 'v2.1 requests', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:request) { repo.requests.first }
# TODO
# post '/requests'
describe 'in public mode, with a private repo', mo... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/hooks_spec.rb | Ruby | mit | 298 | master | 2,564 | describe 'v2.1 hooks', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
# TODO put /hooks/:id
describe 'in public mode, with a public repo', mode: :public, repo: :public do
describe 'GET /hooks' ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/builds_spec.rb | Ruby | mit | 298 | master | 10,169 | describe 'v2.1 builds', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
# TODO
# post '/builds/:id/cancel'
# post '/builds/:id/restart'
describe 'in public ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2.1/users_spec.rb | Ruby | mit | 298 | master | 6,433 | describe 'v2.1 users', auth_helpers: true, api_version: :'v2.1', set_app: true do
let(:user) { User.first }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let!(:request) do
WebMock.stub_request(:post, 'http://vcsfake.travis-ci.com/users/1/check_scopes')
.to_return(
status: 200,
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/hooks_spec.rb | Ruby | mit | 298 | master | 2,558 | describe 'v1 hooks', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
# TODO put /hooks/:id
describe 'in public mode, with a private repo', mode: :public, repo: :private do
describe 'GET /hooks' do
... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/env_vars_spec.rb | Ruby | mit | 298 | master | 2,934 | describe 'v1 settings/env_vars', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
before { repo.settings.tap { |s| s.env_vars.create(name: 'FOO', value: 'foo', private: true) && s.save } }
before { stub_... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/logs_spec.rb | Ruby | mit | 298 | master | 3,140 | describe 'v1 logs', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
let(:job) { Job.where(source_id: build.id).first }
let(:log) { double(id: 1) }
let(:log_url... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/jobs_spec.rb | Ruby | mit | 298 | master | 6,314 | describe 'v1 jobs', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:job) { repo.builds.first.matrix.first }
let(:log) { %({"job_id": #{job.id}, "content": "content"}) }
let(:log_url) { "#{Travis... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/users_spec.rb | Ruby | mit | 298 | master | 4,959 | describe 'v1 users', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { User.first }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
# TODO put /users/
# TODO put /users/:id ?
# TODO post /users/sync
describe 'in public mode, with a public repo', mode: :public, repo: :public ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/broadcasts_spec.rb | Ruby | mit | 298 | master | 1,350 | describe 'v1 broadcasts', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
before { Broadcast.create!(recipient: user) }
describe 'in public mode', mode: :public do
describe 'GET /broadcasts' do
it(:authenticated) { should auth status: 406 } # no v1 seri... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/accounts_spec.rb | Ruby | mit | 298 | master | 1,336 | describe 'v1 accounts', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
before { Broadcast.create!(recipient: user) }
describe 'in public mode', mode: :public do
describe 'GET /accounts' do
it(:authenticated) { should auth status: 406 } # no v1 serializ... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/ssh_keys_spec.rb | Ruby | mit | 298 | master | 2,966 | describe 'v1 settings/ssh_key', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
before do
settings = repo.settings
record = settings.create(:ssh_key, description: 'key for my repo', value: TEST_PRI... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/builds_spec.rb | Ruby | mit | 298 | master | 10,375 | describe 'v1 builds', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
before do
Travis.config.billing.url = 'http://localhost:9292/'
Travis.config.billing.auth... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/branches_spec.rb | Ruby | mit | 298 | master | 6,236 | describe 'v1 branches', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
describe 'in public mode, with a private repo', mode: :public, repo: :private do
describe '... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/repos_spec.rb | Ruby | mit | 298 | master | 29,107 | describe 'v1 repos', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
before(:all) { SslKey.create(repository_id: 1) }
before { SslKey.update_all(repository_id: repo.... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/requests_spec.rb | Ruby | mit | 298 | master | 4,243 | describe 'v1 requests', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:request) { repo.requests.first }
# TODO
# post '/requests'
describe 'in public mode, with a private repo', mode: :p... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v1/repo_status_spec.rb | Ruby | mit | 298 | master | 26,318 | describe 'v1 status', auth_helpers: true, api_version: :v1, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:build) { repo.builds.first }
def repo
@repo ||= Repository.by_slug('svenfuchs/minimal').first
end
before(:all) { SslKey.create(repository_id: repo.id) }
before { SslKey.update_all... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2/logs_spec.rb | Ruby | mit | 298 | master | 3,873 | describe 'v2 logs', auth_helpers: true, api_version: :v2, set_app: true do
let(:user) { FactoryBot.create(:user) }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
let(:build) { repo.builds.first }
let(:job) { build.matrix.first }
let(:log) { double(id: 1) }
before { stub_request(:get, %r... |
github | travis-ci/travis-api | https://github.com/travis-ci/travis-api | spec/auth/v2/users_spec.rb | Ruby | mit | 298 | master | 6,240 | describe 'v2 users', auth_helpers: true, api_version: :v2, set_app: true do
let(:user) { User.first }
let(:repo) { Repository.by_slug('svenfuchs/minimal').first }
before { allow_any_instance_of(Travis::RemoteVCS::User).to receive(:check_scopes) }
# TODO put /users/
# TODO put /users/:id ?
# TODO post /use... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.