Sha256: 3416fe6d9eb89ced7e4980f3e9ec5d2b26b65cd424be12896efcc58899a5cd64

Contents?: true

Size: 622 Bytes

Versions: 11

Compression:

Stored size: 622 Bytes

Contents

Given(/^there are credentials set$/) do
  Celluloid::Actor[:nestene_core].set_credentials({'a' => 'b'})
end

When(/^I get credentials$/) do
  get '/credentials'
end

Then(/^I should receive credentials$/) do
  expect(last_response.status).to be(200)
  response = JSON.parse(last_response.body)
  expect(response).to eq({'a' => 'b'})
end

When(/^I set credentials$/) do
  post '/credentials', {'a' => 'b'}.to_json, 'Content-Type' => 'application/json'
end

Then(/^the credentials should be set$/) do
  expect(last_response.status).to be(200)
  expect(Celluloid::Actor[:nestene_core].get_credentials).to eq({'a' => 'b'})
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nestene-0.2.1 features/step_definitions/api/api_credentials_steps.rb
nestene-0.2.0 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.8 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.7 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.6 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.5 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.4 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.3 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.2 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.1 features/step_definitions/api/api_credentials_steps.rb
nestene-0.1.0 features/step_definitions/api/api_credentials_steps.rb