Sha256: 50bec280bc64d98af5b3a6ff03067f1f82b746f84e656a6a058390de2d357985
Contents?: true
Size: 819 Bytes
Versions: 27
Compression:
Stored size: 819 Bytes
Contents
require 'spec_helper' describe Alchemy::Admin::PicturesHelper do describe "#create_or_assign_url" do let(:picture) { mock_model('Picture') } let(:options) { Hash.new } before { @element = mock_model('Element') } it "should return a Hash" do expect(helper.create_or_assign_url(picture, options)).to be_a(Hash) end context "when creating" do it "should include 'create' as the value for the action key" do expect(helper.create_or_assign_url(picture, options)[:action]).to be(:create) end end context "when assigning" do before { @content = mock_model('Content') } it "should include 'assign' as the value for the action key" do expect(helper.create_or_assign_url(picture, options)[:action]).to be(:assign) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems