comments_controller_test.rb revision 8566aec18eff0f0d248d73d2f44f9df16cc41456
require 'test_helper'
should route(:get, "/ontologies/ontology_id/comments").to(:controller=> :comments, :action => :index, :ontology_id => 'ontology_id')
should route(:post, "/ontologies/ontology_id/comments").to(:controller=> :comments, :action => :create, :ontology_id => 'ontology_id')
context 'ontology' do
setup do
end
context 'not signed in' do
context 'on GET to index' do
context 'without comment' do
setup do
end
end
context 'with comment' do
setup do
end
end
end
end
context 'signed in' do
setup do
end
context 'on GET to index' do
context 'without comment' do
setup do
end
end
context 'with comment' do
setup do
end
end
context 'on POST to delete' do
setup do
end
end
end
context 'on POST to create' do
context 'with too short text' do
setup do
end
end
context 'with too enough text' do
setup do
end
end
end
end
end
end