Created
May 25, 2013 13:29
-
-
Save janjiss/5649042 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 'spec_helper' | |
| describe Terminal do | |
| let(:terminal) { | |
| Terminal.create( | |
| :address => "Kuldiga, Grants iela 29, Latvija", | |
| :type => "ATM" | |
| ) | |
| } | |
| it "should initialize" do | |
| expect(terminal.errors).to be_empty | |
| end | |
| it "should have address" do | |
| expect(terminal.address).to eq("Kuldiga, Grants iela 29, Latvija") | |
| end | |
| it "should have longditude" do | |
| expect(terminal.lng).to be_present | |
| end | |
| it "should have latitude" do | |
| expect(terminal.lat).to be_present | |
| end | |
| it "should have latitude" do | |
| expect(terminal.lat).to eq(56.9718347) | |
| end | |
| it "should have longditude" do | |
| expect(terminal.lng).to eq(21.9571646) | |
| end | |
| it "should have type" do | |
| expect(terminal.type).to eq("ATM") | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment