Merge pull request #5423 from betagouv/feat/5402

Feat/5402 - [Admin] new UI for procedures listing
This commit is contained in:
Kara Diaby 2020-07-29 17:38:49 +02:00 committed by GitHub
commit 5894a86bd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 228 additions and 32 deletions

View file

@ -41,23 +41,6 @@ describe Admin::ProceduresController, type: :controller do
it { expect(response.status).to eq(200) }
end
describe 'GET #index with sorting and pagination' do
before do
create(:procedure, administrateur: admin)
admin.reload
end
subject {
get :index, params: {
'procedures_smart_listing[page]': 1,
'procedures_smart_listing[per_page]': 10,
'procedures_smart_listing[sort][id]': 'asc'
}
}
it { expect(subject.status).to eq(200) }
end
describe 'GET #archived' do
subject { get :archived }

View file

@ -43,6 +43,27 @@ describe NewAdministrateur::ProceduresController, type: :controller do
sign_in(admin.user)
end
describe 'GET #index' do
subject { get :index }
it { expect(response.status).to eq(200) }
end
describe 'GET #index with sorting and pagination' do
before do
create(:procedure, administrateur: admin)
admin.reload
end
subject {
get :index, params: {
'statut': 'publiees'
}
}
it { expect(subject.status).to eq(200) }
end
describe 'GET #edit' do
let(:published_at) { nil }
let(:procedure) { create(:procedure, administrateur: admin, published_at: published_at) }