Last active
December 14, 2015 03:19
-
-
Save remi/5019778 to your computer and use it in GitHub Desktop.
let, let, let, let, let, let, let.
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
describe ReportsController do | |
subject { last_response } | |
describe :create do | |
let(:payload) { { :serial => serial, :version => "1.0.0" } } | |
before { post reports_path, payload.to_json } | |
context "with present serial" do | |
let(:serial) { "123abc" } | |
it { should be_ok } | |
its(:status) { should eq 200 } | |
end | |
context "with missing serial" do | |
let(:serial) { nil } | |
it { should_not be_ok } | |
its(:status) { should eq 400 } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment