Sha256: 074084c881430536bcccd41e31ade6b87361c77eaa66d8f850ae63c24fed690a

Contents?: true

Size: 774 Bytes

Versions: 3

Compression:

Stored size: 774 Bytes

Contents

require 'test_helper'

# basic clever-ruby tests
# TODO: organize better
class CleverTest < Test::Unit::TestCase
  def setup
    Clever.configure do |config|
      config.api_key = 'DEMO_KEY'
    end
  end

  should 'returns correct urls for Resources' do
    assert_equal 'v1.1/districts', Clever::District.url
    assert_equal 'v1.1/schools', Clever::School.url
    assert_equal 'v1.1/students', Clever::Student.url
    assert_equal 'v1.1/sections', Clever::Section.url
    assert_equal 'v1.1/teachers', Clever::Teacher.url
    assert_equal 'v1.1/events', Clever::Event.url
  end

  should 'uri-encode params' do
    query_string = Clever.convert_to_query_string created_at: '2013-02-15T 2:30:42Z'
    query_string.must_equal 'created_at=2013-02-15T%202:30:42Z'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clever-ruby-0.6.1 test/unit/clever_test.rb
clever-ruby-0.6.0 test/unit/clever_test.rb
clever-ruby-0.5.0 test/unit/clever_test.rb