Sha256: 97ae16d8e81d5a55893883df2bcf22dce237d1606d1d36d0d87cde0c4cade74e
Contents?: true
Size: 917 Bytes
Versions: 2
Compression:
Stored size: 917 Bytes
Contents
require 'spec_helper' describe 'curation_concerns/admin/workflow_roles/index.html.erb', type: :view do let!(:user1) { create(:user) } let!(:user2) { create(:user) } let(:presenter) do CurationConcerns::Admin::WorkflowRolePresenter.new end before do assign(:presenter, presenter) allow(view).to receive(:admin_workflow_roles_path).and_return('/admin/workflow_roles') end context 'with no users having workflow roles' do it 'displays "No Roles" for each user' do render expect(rendered).to have_content('No roles', count: User.count) end end context 'with some users having workflow roles' do before do # Force user instances to have corresponding sipity agents user1.to_sipity_agent user2.to_sipity_agent end it 'displays roles for each user' do render expect(rendered.match(/<ul>\s+<\/ul>/m)).to be nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems