Adds spec coverage for additional Neo4j connection options

This commit is contained in:
Brien Wankel 2015-06-29 09:43:29 -07:00
parent 9dd56c7587
commit 4601a36472

View file

@ -24,6 +24,13 @@ module DatabaseCleaner
subject.db.should eq db_conf
end
it "should respect additional connection parameters" do
db_conf = {:type => :server_db, :path => 'http://localhost:7474', basic_auth: {username: 'user', password: 'pass'}}
subject.db = db_conf
stub_const("Neo4j::Session", double()).should_receive(:open).with(:server_db, 'http://localhost:7474', {basic_auth: {username: 'user', password: 'pass'}}) { true }
subject.start
end
it "should default to nil" do
subject.db.should be_nil
end