Created
May 16, 2017 15:01
-
-
Save cheesepaulo/4f2b53afb1aa2988e7a7f056567b987e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
require 'sptrans/sptrans_api_service' | |
describe SPTrans::APIService do | |
describe "#connect" do | |
subject { described_class.new.connect(HTTPClient.new).status_code } | |
it { is_expected.to eq 200 } | |
end | |
describe '#getUpcomingBus' do | |
it "returns a hash with data" do | |
response = described_class.new.getUpcomingBus("4200953") | |
expect(response.class).to eq Hash | |
expect(response).to_not be_empty | |
end | |
end | |
describe '#getBusPosition' do | |
it "returns a hash with data" do | |
response = described_class.new.getBusPosition("175T-10") | |
expect(response.class).to eq Hash | |
expect(response).to_not be_empty | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment