repository_test.rb revision 184bb45b6cb62422583b634cc27d04fc2ba0e0f6
require 'test_helper'
context "a repository" do
setup do
end
teardown do
end
context 'with a reserved name' do
should 'not be valid' do
end
end
context 'creating a permission' do
setup do
end
should 'with subject' do
end
should 'with role owner' do
end
end
context 'saving a file' do
setup do
@message = 'test message'
@content = "(Cat x)\n"
# create directory if it doesn't exist
end
# create file
end
should 'not have an ontology yet' do
end
context "that doesn't exist" do
setup do
end
should 'create the file in the git repository' do
end
should 'create the file with correct contents in the git repository' do
end
should 'create a new ontology with a default name' do
end
should 'create a new ontology with only one version pointing to the commit' do
end
should 'create a new ontology with only one version belonging to the right user' do
end
end
context 'that exists' do
setup do
end
end
teardown do
end
should 'create a new ontology version' do
end
end
end
context 'browsing the repository' do
setup do
@files = {
}
@message = 'test message'
@file_path_prefix = '/tmp/ontohub/test/git_repository/'
file_path = "#{@file_path_prefix}#{path}"
# create directory if it doesn't exist
end
# create file
end
end
end
teardown do
end
should 'list files and directories in the directories' do
end
assert_equal [{
:type=>:dir,
:index=>0,
:ontologies => []
}], selected_entry
end
expected = {
type: :file_base,
}
expected = {
type: :file_base_ambiguous,
entries: [
]
}
end
@files.each do |path, content|
end
end
end
end
end
end
end
end