Sha256: a8c44de1a3df6eb6af0e88226475455ba4a058d765c4bd4dddce29eb42117b67
Contents?: true
Size: 683 Bytes
Versions: 1
Compression:
Stored size: 683 Bytes
Contents
When /^I post some data to "(.*?)" in the API$/ do |route| @data = { key: 'all.i.want.to.do', value: 'is.bang.bang.bang' } @response = API.post do |req| req.url "api/#{route}" req.params = @data end end Then /^I should receive a json response that it was saved successfully$/ do @response.status.should be 200 response_json = JSON.parse(@response.body) response_json.class.should eql Hash response_json.keys.should_not include 'errors' response_json.values.should include 'all.i.want.to.do' response_json.keys.should include 'expires_in' end Then /^it should be saved in memcached$/ do key = Memcached.get(@data[:key]) key.should == @data[:value] end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
memcached-manager-1.0.0 | features/step_definitions/api/create_memcached_key.rb |