Sha256: 6d4e933aa3d2710c199dba41da425b03b1a00388310fffeeea080378050c7fc1

Contents?: true

Size: 853 Bytes

Versions: 3

Compression:

Stored size: 853 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

3 entries across 3 versions & 1 rubygems

Version Path
decidim-0.1.0 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.0.8.1 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb
decidim-0.0.7 decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb