This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- @desc: Return the sum of all scores in a sorted set | |
-- @usage: redis-cli eval "$(cat ZSUM.lua)" N <zset1> <zset2> ... <zsetN> | |
-- @return: integer sum | |
local function ZSUM(keys) | |
local sum = 0 | |
local function sumKeyScores(key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonSlurper | |
import org.springframework.test.web.servlet.MockMvc | |
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.* | |
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; | |
import static org.springframework.http.HttpStatus.* | |
import spock.lang.Specification | |
/** | |
* A Spock Spring MVC Rest unit test that doesn't require a full spring context | |
*/ |