From 56364b2c1a0b0005afecf6c2a8f9cbe075f16ab0 Mon Sep 17 00:00:00 2001 From: sirwolfgang Date: Sat, 19 Jul 2014 21:05:39 +0000 Subject: [PATCH] migrate schema and removal depercated tests --- db/schema.rb | 3 +- spec/models/github_spec.rb | 58 -------------------------------------- 2 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 spec/models/github_spec.rb diff --git a/db/schema.rb b/db/schema.rb index bf23f1cf..f1bfdeac 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140717105025) do +ActiveRecord::Schema.define(:version => 20140719160422) do create_table "alias_tags", :id => false, :force => true do |t| t.integer "tag_id" @@ -424,7 +424,6 @@ t.string "linkedin_secret" t.datetime "last_email_sent" t.string "linkedin_public_url" - t.boolean "beta_access", :default => false t.text "redemptions" t.integer "endorsements_count", :default => 0 t.string "team_document_id" diff --git a/spec/models/github_spec.rb b/spec/models/github_spec.rb deleted file mode 100644 index d90d8ffc..00000000 --- a/spec/models/github_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -RSpec.describe Github, type: :model, functional: true, skip: ENV['TRAVIS'] do - let(:github) { GithubOld.new } - - it 'can get profile' do - expect(github.profile('mdeiters')[:name]).to eq('Matthew Deiters') - end - - it 'can get orgs' do - expect(github.orgs_for('defunkt', 2.years.ago).first['login']).to eq('github') - end - - it 'can get followers' do - expect(github.followers_for('mdeiters').map { |follower| follower['login'] }).to include('alexrothenberg') - end - - it 'gets all followers if multiple pages' do - total_followers = github.followers_for('obie').size - expect(total_followers).to be > 200 - end - - it 'gets all repos for user' do - expect(github.repos_for('mdeiters').map { |follower| follower['name'] }).to include('travis-ci') - end - - it 'gets all watched repos for user' do - expect(github.watched_repos_for('mdeiters').map { |repo| repo[:name] }).to include('readraptor') - end - - it 'gets watchers of a repo' do - expect(github.repo_watchers('mdeiters', 'semr', 10.years.ago).first[:login]).to eq('pius') - end - - it 'gets languages of a repo' do - expect(github.repo_languages('mdeiters', 'semr', 2.years.ago)).to include("Ruby", "JavaScript") - end - - it 'gets contributors of a repo' do - expect(github.repo_contributors('mdeiters', 'healthy', 2.years.ago).collect { |r| r[:login] }).to include("flyingmachine") - end - - it 'recovers if getting contributors errors out' do - expect { github.repo_contributors('dmtrs', 'EJNestedTreeActions', 2.years.ago) }.not_to raise_error - end - - it 'gets all forks of a repo' do - expect(github.repo_forks('mdeiters', 'semr', 2.years.ago).collect { |r| r[:owner][:login] }).to include('derfred') - end - - it 'should scope requests by user' do - daniel = GithubOld.new(daniel_h = '697b68755f419b475299873164e3c60fca21ae58') - expect(daniel.profile['login']).to eq('flyingmachine') - end - - it 'should scope requests by user but allow override' do - daniel = GithubOld.new(daniel_h = '697b68755f419b475299873164e3c60fca21ae58') - expect(daniel.profile['login']).not_to eq(daniel.profile('bguthrie')['login']) - end -end