Skip to content

Commit

Permalink
disable tests for features that are not yet implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Oct 22, 2024
1 parent 45f5952 commit b6cfd5a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions test/controllers/ontologies_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

class OntologiesControllerTest < ActionDispatch::IntegrationTest
ONTOLOGIES = LinkedData::Client::Models::Ontology.all(include: 'acronym')
PAGES = %w[summary classes properties notes mappings schemes collections widgets].freeze
# ONTOLOGIES = LinkedData::Client::Models::Ontology.find_by_acronym('NCIT', include: 'acronym')
#
# PAGES: schemes, collections are not yet implemented
#PAGES = %w[summary classes properties notes mappings schemes collections widgets].freeze
PAGES = %w[summary classes properties notes mappings widgets].freeze

test 'should return all the ontologies' do
get ontologies_path
Expand All @@ -24,6 +28,7 @@ class OntologiesControllerTest < ActionDispatch::IntegrationTest
end

test "should open the tree views of #{ont.acronym} ontology" do
skip('functionality not yet implemented')
paths = [
ajax_classes_treeview_path(ontology: ont.acronym),
"/ontologies/#{ont.acronym}/properties"
Expand All @@ -41,65 +46,75 @@ class OntologiesControllerTest < ActionDispatch::IntegrationTest
end

test 'test get STY in html format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'text/html' }
assert_response :success
assert_equal 'text/html; charset=utf-8', response.content_type
end

test 'test get STY in json format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'application/json' }
assert_response :success
assert_equal 'application/json', response.content_type

end

test 'test get STY in xml format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'application/xml' }
assert_equal 500, response.status # STY has only Turtle
end

test 'test get STY in csv format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'text/csv' }
assert_response :success
end

test 'test get STY in turtle format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'text/turtle' }
assert_response :success
end

test 'test get STY in ntriples format' do
skip('functionality not yet implemented')
get '/ontologies/STY', headers: { 'Accept' => 'application/ntriples' }
assert_response :not_acceptable
end


test 'test get STY resource in html format' do
skip('test does not account for variation of PURL settings across OntoPortal instances')
get '/ontologies/STY/T071', headers: { 'Accept' => 'text/html' }
assert_includes ["http://www.example.com/ontologies/STY?conceptid=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSTY%2FT071&p=classes", "http://www.example.com/ontologies/STY?conceptid=http%3A%2F%2Fpurl.lirmm.fr%2Fontology%2FSTY%2FT071&p=classes"], response.location
assert_response :redirect
assert_equal "text/html; charset=utf-8" , response.content_type
end

test 'test get STY resource in json format' do
skip('functionality not yet implemented')
get '/ontologies/STY/T071', headers: { 'Accept' => 'application/json' }
assert_response :success
assert_equal "application/ld+json; charset=utf-8" , response.content_type
end

test 'test get STY resource in xml format' do
skip('functionality not yet implemented')
get '/ontologies/STY/T071', headers: { 'Accept' => 'application/xml' }
assert_response :success
assert_equal "application/rdf+xml; charset=utf-8" , response.content_type
end

test 'test get STY resource in ntriples format' do
skip('functionality not yet implemented')
get '/ontologies/STY/T071', headers: { 'Accept' => 'application/n-triples' }
assert_response :success
assert_equal "application/n-triples; charset=utf-8" , response.content_type
end

test 'test get STY resource in turtle format' do
skip('functionality not yet implemented')
get '/ontologies/STY/T071', headers: { 'Accept' => 'text/turtle' }
assert_response :success
assert_equal "text/turtle; charset=utf-8" , response.content_type
Expand Down

0 comments on commit b6cfd5a

Please sign in to comment.