Search in sources :

Example 6 with NamedMongoScript

use of org.springframework.data.mongodb.core.script.NamedMongoScript in project spring-data-mongodb by spring-projects.

the class DefaultScriptOperationsTests method saveShouldStoreExecutableScriptCorrectly.

// DATAMONGO-479
@Test
public void saveShouldStoreExecutableScriptCorrectly() {
    NamedMongoScript script = scriptOps.register(EXECUTABLE_SCRIPT);
    Query query = query(where("_id").is(script.getName()));
    assumeThat(template.exists(query, JAVASCRIPT_COLLECTION_NAME), is(true));
}
Also used : Query(org.springframework.data.mongodb.core.query.Query) NamedMongoScript(org.springframework.data.mongodb.core.script.NamedMongoScript) Test(org.junit.Test)

Aggregations

NamedMongoScript (org.springframework.data.mongodb.core.script.NamedMongoScript)6 Test (org.junit.Test)3 ExecutableMongoScript (org.springframework.data.mongodb.core.script.ExecutableMongoScript)3 IOException (java.io.IOException)2 URL (java.net.URL)2 Organization (org.devgateway.ocds.persistence.mongo.Organization)2 Release (org.devgateway.ocds.persistence.mongo.Release)2 ScriptOperations (org.springframework.data.mongodb.core.ScriptOperations)2 Index (org.springframework.data.mongodb.core.index.Index)2 TextIndexDefinitionBuilder (org.springframework.data.mongodb.core.index.TextIndexDefinition.TextIndexDefinitionBuilder)2 HashSet (java.util.HashSet)1 VNLocation (org.devgateway.ocvn.persistence.mongo.dao.VNLocation)1 Query (org.springframework.data.mongodb.core.query.Query)1