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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ group :test do
gem 'simplecov', '>= 0.9'
gem 'timecop'
gem 'tins'
gem 'webmock', '>= 1.10.1'
gem 'webmock', '>= 3.1.0'
end

gemspec
6 changes: 3 additions & 3 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2550,7 +2550,7 @@
context 'with file' do
before do
@cli.options = @cli.options.merge('file' => fixture_path + '/long.png')
stub_request(:post, 'https://upload.twitter.com/1.1/media/upload.json')
stub_request(:post, 'https://upload.twitter.com/1.1/media/upload.json').to_return(body: fixture('media.json'), headers: {content_type: 'application/json; charset=utf-8'})
stub_post('/1.1/statuses/update.json').to_return(body: fixture('status.json'), headers: {content_type: 'application/json; charset=utf-8'})
end
it 'requests the correct resource' do
Expand Down Expand Up @@ -3892,13 +3892,13 @@
context 'with file' do
before do
@cli.options = @cli.options.merge('file' => fixture_path + '/long.png')
stub_request(:post, 'https://upload.twitter.com/1.1/media/upload.json')
stub_request(:post, 'https://upload.twitter.com/1.1/media/upload.json').to_return(body: fixture('media.json'), headers: {content_type: 'application/json; charset=utf-8'})
stub_post('/1.1/statuses/update.json').to_return(body: fixture('status.json'), headers: {content_type: 'application/json; charset=utf-8'})
end
it 'requests the correct resource' do
@cli.update('Testing')
expect(a_request(:post, 'https://upload.twitter.com/1.1/media/upload.json')).to have_been_made
expect(a_post('/1.1/statuses/update_with_media.json')).to have_been_made
expect(a_post('/1.1/statuses/update.json')).to have_been_made
end
it 'has the correct output' do
@cli.update('Testing')
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/media.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"image":{"w":428,"h":428,"image_type":"image/png"},"media_id":470030289822314497,"media_id_string":"470030289822314497","size":68900}
4 changes: 2 additions & 2 deletions t.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
spec.add_dependency 'oauth', '~> 0.5.1'
spec.add_dependency 'retryable', '~> 2.0'
spec.add_dependency 'thor', ['>= 0.19.1', '< 2']
spec.add_dependency 'twitter', '~> 6.0'
spec.add_development_dependency 'bundler', '~> 1.0'
spec.add_dependency 'twitter', '~> 6.2'
spec.add_development_dependency 'bundler', '~> 2.1'
spec.author = 'Erik Michaels-Ober'
spec.description = 'A command-line power tool for Twitter.'
spec.email = '[email protected]'
Expand Down