Sha256: a3300ae0d1136b495f8af7f1b076e653fb94f23fa166f9d44669b014a585ca29

Contents?: true

Size: 854 Bytes

Versions: 5

Compression:

Stored size: 854 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Decidim::Admin::ProcessAdminRolesForProcess do
  let(:organization) { create :organization }
  let!(:process1) { create :participatory_process, organization: organization }
  let!(:process2) { create :participatory_process, organization: organization }
  let!(:user_role1) { create :participatory_process_user_role, participatory_process: process1, role: :admin }
  let!(:user_role2) { create :participatory_process_user_role, participatory_process: process2 }
  let!(:user_role3) { create :participatory_process_user_role, participatory_process: process1, role: :collaborator }

  subject { described_class.new(process1) }

  it "returns only the user roles for the given process" do
    expect(subject.query).to include user_role1
    expect(subject.query).to include user_role3
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-0.4.0 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.3.2 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.3.1 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.3.0 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.2.0 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb