Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix tests

  • Loading branch information...
commit 8b28a222d289d0bed67f73f7a59a688b45c08213 1 parent 08d544a
@technoweenie authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 test/app_test.rb
  2. +1 −1  test/service_test.rb
View
8 test/app_test.rb
@@ -169,13 +169,13 @@ def test_reject_shortened_url_from_other_domain_by_regex
end
def test_get_without_code_returns_default_url
- App.set :service, Service.new(ADAPTER, /abc\.com$/, nil, nil, "http://google.com")
- get '/'
- assert_equal "http://google.com", last_response.headers['location']
+ with_service :default_url => 'http://google.com' do
+ get '/'
+ assert_equal "http://google.com", last_response.headers['location']
+ end
end
def test_get_without_code_no_default_url
- App.set :service, Service.new(ADAPTER, /abc\.com$/)
get '/'
assert_equal nil, last_response.headers['location']
end
View
2  test/service_test.rb
@@ -127,7 +127,7 @@ def test_fixed_charset_code
@db = MemoryAdapter.new
length = 4
char_set = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
- @service = Service.new @db, nil, length, char_set
+ @service = Service.new @db, :length => length, :charset => char_set
url = 'http://github.com'
status, head, body = @service.create(url)
Please sign in to comment.
Something went wrong with that request. Please try again.