Sha256: 35525a3fa9ac382744d0131a96d5f92bd8de50ddbeb454e7f208319087590d78
Contents?: true
Size: 890 Bytes
Versions: 11
Compression:
Stored size: 890 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim describe ParticipatoryProcess do let(:participatory_process) { build(:participatory_process, slug: "my-slug") } subject { participatory_process } it { is_expected.to be_valid } include_examples "publicable" context "when there's a process with the same slug in the same organization" do let!(:external_process) { create :participatory_process, organization: participatory_process.organization, slug: "my-slug" } it "is not valid" do expect(subject).not_to be_valid expect(subject.errors[:slug]).to eq ["has already been taken"] end end context "when there's a process with the same slug in another organization" do let!(:external_process) { create :participatory_process, slug: "my-slug" } it { is_expected.to be_valid } end end end
Version data entries
11 entries across 11 versions & 1 rubygems