Created
January 9, 2019 22:57
-
-
Save panSarin/de10c406ed6c9e3c994a2afcff118486 to your computer and use it in GitHub Desktop.
This file contains 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 Admin::Merchant::Create do | |
subject(:result) { described_class.call(params) } | |
context "valid data" do | |
let(:params) { | |
{ | |
name: "Death Star supplier", | |
category: "Space Merchants" | |
} | |
} | |
it "saves our merchant to the database" do | |
expect(result).to eq(true) | |
added_merchant = Merchant.last | |
expect(added_merchant.name).to eq("Death Start supplier") | |
expect(added_merchant.category).to eq("Space Merchants") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment