Skip to content

Commit

Permalink
test query for failing test / stub request
Browse files Browse the repository at this point in the history
  • Loading branch information
vasconsaurus committed Jan 24, 2024
1 parent 7b47136 commit e81a52d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/models/parser/twitter_profile_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ def stub_profile_lookup

test "it makes a get request to the user lookup by username endpoint successfully" do
stub_configs({'twitter_bearer_token' => 'test' })

WebMock.stub_request(:get, "https://api.twitter.com/2/users/by")
.with(query: query)
.with(headers: {
"Authorization": "Bearer test",

WebMock.stub_request(:get, "https://api.twitter.com/2/users/by?user.fields=profile_image_url,name,username,description,created_at,url&usernames=fake_user")
.with(headers: {
"Authorization": "Bearer test",
'Accept'=>'*/*',
'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent'=>'Ruby'
Expand Down

0 comments on commit e81a52d

Please sign in to comment.