Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clean up WebHook specs.

  • Loading branch information...
commit c41819587f6e7d40871118d1bceebb97ea99ab94 1 parent 28211ff
@tylerhunt authored
Showing with 16 additions and 6 deletions.
  1. +16 −6 spec/brewery_db/web_hook_spec.rb
View
22 spec/brewery_db/web_hook_spec.rb
@@ -2,7 +2,6 @@
require 'brewery_db/web_hook'
describe BreweryDB::WebHook do
- subject(:web_hook) { described_class.new(brewery_db_payload) }
let(:action) { 'edit' }
let(:attribute) { 'beer' }
let(:attribute_id) { 'x6bRxw' }
@@ -10,9 +9,20 @@
let(:nonce) { '576a8003ab8936d99fb104401141d613' }
let(:sub_action) { 'none' }
let(:timestamp) { '1350573527' }
- let(:brewery_db_payload) { { key: key, nonce: nonce, attribute: attribute,
- attributeId: attribute_id, action: action,
- subAction: sub_action, timestamp: timestamp } }
+
+ let(:brewery_db_payload) {
+ {
+ key: key,
+ nonce: nonce,
+ attribute: attribute,
+ attributeId: attribute_id,
+ action: action,
+ subAction: sub_action,
+ timestamp: timestamp
+ }
+ }
+
+ subject(:web_hook) { described_class.new(brewery_db_payload) }
describe '.new' do
it 'extracts the action' do
@@ -23,7 +33,7 @@
expect(web_hook.attribute).to eq(attribute)
end
- it 'extracts the attributeId' do
+ it 'extracts the attribute ID' do
expect(web_hook.attribute_id).to eq(attribute_id)
end
@@ -35,7 +45,7 @@
expect(web_hook.nonce).to eq(nonce)
end
- it 'extracts the subAction' do
+ it 'extracts the sub-action' do
expect(web_hook.sub_action).to eq(sub_action)
end
Please sign in to comment.
Something went wrong with that request. Please try again.