summaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2009-08-25 20:46:36 +0200
committerChristoph Helma <helma@in-silico.de>2009-08-25 20:46:36 +0200
commit61646780607e3e43a581053038bb169efedd3e3d (patch)
tree434250a026ce3df96a832f566717162cb29c5f84 /test.rb
parent25fa0211c961242504e34c9c3b84154ec80e5801 (diff)
refactured for redis key-value database, passes initial tests
Diffstat (limited to 'test.rb')
-rw-r--r--test.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/test.rb b/test.rb
deleted file mode 100644
index 2a0252f..0000000
--- a/test.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-ENV['RACK_ENV'] = 'test'
-require 'application'
-require 'test/unit'
-require 'rack/test'
-
-
-class DatasetsTest < Test::Unit::TestCase
- include Rack::Test::Methods
-
- def app
- Sinatra::Application
- end
-
- def test_index
- get '/'
- assert last_response.ok?
- end
-
- def test_create_dataset
- #authorize "api", API_KEY
- post '/', :name => "Test dataset"
- assert last_response.ok?
- assert_equal "http://example.org/1", last_response.body.chomp
- end
-
- def test_create_dataset_and_insert_data
- #authorize "api", API_KEY
- post '/', :name => "Test dataset"
- post '/1', :compound_uri => "test_compound_uri", :feature_uri => "test_feature_uri"
- get '/1'
- assert last_response.ok?
- assert last_response.body.include?('Test dataset')
- assert last_response.body.include?('test_compound_uri')
- assert last_response.body.include?('test_feature_uri')
- end
-
-=begin
- def test_unauthorized_create
- post '/', :name => "Test dataset"
- assert !last_response.ok?
- end
-=end
-
-end