Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 23 lines (18 sloc) 0.475 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 'helper'

#Parse.init :application_id => $PARSE_APPLICATION_ID, :api_key => $PARSE_REST_API_KEY

class TestInit < Test::Unit::TestCase
  def setup
    Parse.destroy
  end
  
  def test_no_api_keys_error
    fake = Parse::Object.new "shouldNeverExist"
    fake["foo"] = "bar"
    
    begin
      fake.save
    rescue
      error_triggered = true
    end
    
    assert_equal error_triggered, true
    assert_equal fake[Parse::Protocol::KEY_OBJECT_ID], nil
  end
end
Something went wrong with that request. Please try again.