Sha256: be3bd6a285168af8251fa6bf63368b9094b0000b7d97ca84d9527ee3de1a9648

Contents?: true

Size: 587 Bytes

Versions: 11

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

module Decidim
  module Admin
    describe ManagedUserPromotionForm do
      let(:email) { "foo@example.org" }
      let(:attributes) do
        {
          "managed_user_promotion" => {
            "email" => email
          }
        }
      end

      subject { described_class.from_params(attributes) }

      context "when everything is OK" do
        it { is_expected.to be_valid }
      end

      context "when email is missing" do
        let(:email) {}

        it { is_expected.to be_invalid }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
decidim-0.6.8 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.7 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.6 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.5 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.4 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.3 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.2 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.1 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.6.0 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.5.1 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb
decidim-0.5.0 decidim-admin/spec/forms/managed_user_promotion_form_spec.rb