Skip to content

Commit

Permalink
Prefer single-quoted strings when you don't need string interpolation…
Browse files Browse the repository at this point in the history
… or special symbols
  • Loading branch information
sferik committed Apr 30, 2023
1 parent cc713a7 commit b9b9f8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/cli_spec.rb
Expand Up @@ -132,15 +132,15 @@
before do
stub_get('/1.1/direct_messages/events/list.json').with(query: {count: '50', include_entities: 'false'}).to_return(body: fixture('direct_message_events.json'), headers: {content_type: 'application/json; charset=utf-8'})
stub_get('/1.1/direct_messages/events/list.json').with(query: {count: '50', include_entities: 'false', max_id: '856477710595624962'}).to_return(body: fixture('empty_cursor.json'), headers: {content_type: 'application/json; charset=utf-8'})
stub_get("/1.1/account/verify_credentials.json").with(query: {skip_status: "true"}).to_return(body: fixture("sferik.json"), headers: {content_type: "application/json; charset=utf-8"})
stub_get("/1.1/users/lookup.json").with(query: {user_id: '358486183,311650899,422190131,759849327200047104,73660881,328677087,4374876088,2924245126'}).to_return(body: fixture("direct_message_users.json"), headers: {content_type: "application/json; charset=utf-8"})
stub_get('/1.1/account/verify_credentials.json').with(query: {skip_status: 'true'}).to_return(body: fixture('sferik.json'), headers: {content_type: 'application/json; charset=utf-8'})
stub_get('/1.1/users/lookup.json').with(query: {user_id: '358486183,311650899,422190131,759849327200047104,73660881,328677087,4374876088,2924245126'}).to_return(body: fixture('direct_message_users.json'), headers: {content_type: 'application/json; charset=utf-8'})
end
it 'requests the correct resource' do
@cli.direct_messages
expect(a_get('/1.1/direct_messages/events/list.json').with(query: {count: '50', include_entities: 'false'})).to have_been_made
expect(a_get('/1.1/direct_messages/events/list.json').with(query: {count: '50', include_entities: 'false', max_id: '856477710595624962'})).to have_been_made
expect(a_get("/1.1/account/verify_credentials.json").with(query: {skip_status: "true"})).to have_been_made
expect(a_get("/1.1/users/lookup.json").with(query: {user_id: '358486183,311650899,422190131,759849327200047104,73660881,328677087,4374876088,2924245126'})).to have_been_made
expect(a_get('/1.1/account/verify_credentials.json').with(query: {skip_status: 'true'})).to have_been_made
expect(a_get('/1.1/users/lookup.json').with(query: {user_id: '358486183,311650899,422190131,759849327200047104,73660881,328677087,4374876088,2924245126'})).to have_been_made
end
it 'has the correct output' do
@cli.direct_messages
Expand Down

0 comments on commit b9b9f8b

Please sign in to comment.