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

Version Path
alchemy_cms-3.2.1 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.3 spec/helpers/admin/pictures_helper_spec.rb
lc_alchemy_cms-3.2.1 spec/helpers/admin/pictures_helper_spec.rb
lc_alchemy_cms-3.2.0 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.2.0 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.2.0.rc1 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.2.0.beta spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.1 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.0.4 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.rc3 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.rc2 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.rc1 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta6 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta5 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta4 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.0.3 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta3 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta2 spec/helpers/admin/pictures_helper_spec.rb
alchemy_cms-3.1.0.beta1 spec/helpers/admin/pictures_helper_spec.rb