Skip to content
This repository
tree: 688b408308
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 24 lines (20 sloc) 0.688 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
require 'test_helper'

class HydrantsControllerTest < ActionController::TestCase
  setup do
    @hydrant = hydrants(:hydrant_1)
  end

  # test 'should list hydrants' do
  # skip 'Cannot test query on sqlite3 test database'
  # get :show, :format => 'json', :lat => 42.358431, :lng => -71.059773
  # assert_not_nil assigns :hydrants
  # assert_response :success
  # end

  test 'should update hydrant' do
    assert_not_equal 'Birdsill', @hydrant.name
    put :update, :format => 'json', :id => @hydrant.id, :hydrant => {:name => 'Birdsill'}
    @hydrant.reload
    assert_equal 'Birdsill', @hydrant.name
    assert_not_nil assigns :hydrant
    assert_response :success
  end
end
Something went wrong with that request. Please try again.