entity_display_test.rb revision 0521ac50abdc899fa0533097c8c71dbf0c621758
require 'integration_test_helper'
context 'When text' do
context 'does not contain name' do
setup do
end
context 'page' do
should 'have 2 <th> tags' do
end
end
context 'first <th>' do
should 'have text "Text"' do
end
end
context 'second <th>' do
should 'have text "Name"' do
end
end
end
context 'contains name' do
setup do
@entity.text = 'Foo Bar'
@entity.name = 'Foo'
end
context 'page' do
setup do
end
should 'have 1 <th> tag' do
end
end
context 'and no IRI' do
context 'and name equals text, there' do
setup do
@entity.text = 'Foo'
@entity.name = 'Foo'
end
should 'be no highlighting' do
end
end
end
context 'name' do
should 'be highlighted' do
end
end
end
context 'and an IRI' do
setup do
@entity.text = 'Class <http://example.com/foo_class>'
end
context 'tooltip' do
should 'exist for display_name' do
end
should 'be iri' do
end
end
end
end
end
end