Sha256: 21d39e325837624ed397a28299e1c6743960238e2bd9195cfb560d9859fc3e00

Contents?: true

Size: 691 Bytes

Versions: 20

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

module Decidim
  module Pages
    describe Page do
      let(:page) { create(:page) }
      subject { page }

      include_examples "has feature"

      it { is_expected.to be_valid }

      context "without a feature" do
        let(:page) { build :page, feature: nil }

        it { is_expected.not_to be_valid }
      end

      context "without a valid feature" do
        let(:page) { build :page, feature: build(:feature, manifest_name: "proposals") }

        it { is_expected.not_to be_valid }
      end

      it "has an associated feature" do
        expect(page.feature).to be_a(Decidim::Feature)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
decidim-0.6.8 decidim-pages/spec/models/page_spec.rb
decidim-0.6.7 decidim-pages/spec/models/page_spec.rb
decidim-0.6.6 decidim-pages/spec/models/page_spec.rb
decidim-0.6.5 decidim-pages/spec/models/page_spec.rb
decidim-0.6.4 decidim-pages/spec/models/page_spec.rb
decidim-0.6.3 decidim-pages/spec/models/page_spec.rb
decidim-0.6.2 decidim-pages/spec/models/page_spec.rb
decidim-0.6.1 decidim-pages/spec/models/page_spec.rb
decidim-0.6.0 decidim-pages/spec/models/page_spec.rb
decidim-0.5.1 decidim-pages/spec/models/page_spec.rb
decidim-0.5.0 decidim-pages/spec/models/page_spec.rb
decidim-0.4.4 decidim-pages/spec/models/page_spec.rb
decidim-0.4.3 decidim-pages/spec/models/page_spec.rb
decidim-0.4.2 decidim-pages/spec/models/page_spec.rb
decidim-0.4.1 decidim-pages/spec/models/page_spec.rb
decidim-0.4.0 decidim-pages/spec/models/page_spec.rb
decidim-0.3.2 decidim-pages/spec/models/page_spec.rb
decidim-0.3.1 decidim-pages/spec/models/page_spec.rb
decidim-0.3.0 decidim-pages/spec/models/page_spec.rb
decidim-0.2.0 decidim-pages/spec/models/page_spec.rb