Created
March 12, 2018 19:48
-
-
Save gregblake/555878a6e779d2cf303c7c418b70471d to your computer and use it in GitHub Desktop.
nitro-web/components/core_models/spec/models/media_item_spec.rb
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
| require "rails_helper" | |
| describe MediaItem, ldap: :stub do | |
| describe "validations" do | |
| describe "#attachment" do | |
| context "when there is a device" do | |
| let(:device) { build_stubbed(:mobile_device) } | |
| let(:media_item) { build_stubbed(:media_item, device: device) } | |
| it "should be valid" do | |
| expect(media_item).to be_valid | |
| end | |
| end | |
| context "when there is no device" do | |
| let(:media_item) { build_stubbed(:media_item) } | |
| it "should not be valid" do | |
| expect(media_item).to_not be_valid | |
| end | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment