Skip to content

Instantly share code, notes, and snippets.

@trishagee
Created December 20, 2013 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trishagee/8056166 to your computer and use it in GitHub Desktop.
Save trishagee/8056166 to your computer and use it in GitHub Desktop.
@Unroll
def '#wc should return getlasterror document #commandDocument'() {
expect:
wc.asDocument() == commandDocument;
where:
wc | commandDocument
WriteConcern.UNACKNOWLEDGED | ['getlasterror': 0]
WriteConcern.ACKNOWLEDGED | ['getlasterror': 1]
WriteConcern.REPLICA_ACKNOWLEDGED | ['getlasterror': 1, 'w': 2]
WriteConcern.JOURNALED | ['getlasterror': 1, 'j': true]
WriteConcern.FSYNCED | ['getlasterror': 1, 'fsync': true]
new WriteConcern('majority') | ['getlasterror': 1, 'w': 'majority']
new WriteConcern(1, 100) | ['getlasterror': 1, 'wtimeout': 100]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment