1
0
Fork 0

bugfix #396: Creating a Graph with an existing graph's name _key doesn't throw an error

This commit is contained in:
a-brandt 2013-02-14 15:12:59 +01:00
parent 15ca020c4b
commit 4f244e9096
2 changed files with 8 additions and 7 deletions

View File

@ -136,7 +136,7 @@ describe ArangoDB do
doc1.code.should eq(201)
doc2 = create_graph( prefix, "recreate", vertex_collection, edge_collection )
doc2.code.should eq(201)
doc2.code.should eq(400)
end
it "checks (re)create graph different name" do

View File

@ -585,13 +585,14 @@ function Graph (name, vertices, edges) {
}
}
else {
if (graphProperties.vertices !== vertices.name()) {
throw "found graph but has different <vertices>";
}
throw "graph with that name already exists";
//if (graphProperties.vertices !== vertices.name()) {
// throw "found graph but has different <vertices>";
//}
if (graphProperties.edges !== edges.name()) {
throw "found graph but has different <edges>";
}
//if (graphProperties.edges !== edges.name()) {
// throw "found graph but has different <edges>";
//}
}
}