diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 70135cbde8..e3ab285d7f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,6 +43,13 @@ jobs: plugin-name: pageflow_paged rspec-command: bin/rspec + - engine-name: pageflow_paged + ruby-version: 3.2 + rails-version: "~> 6.1" + engine-directory: entry_types/paged + plugin-name: pageflow_paged + rspec-command: bin/rspec + - engine-name: pageflow_scrolled ruby-version: 2.6 engine-directory: entry_types/scrolled diff --git a/doc/creating_entry_types.md b/doc/creating_entry_types.md index e7873a16ed..3601d94cd0 100644 --- a/doc/creating_entry_types.md +++ b/doc/creating_entry_types.md @@ -206,7 +206,7 @@ editor.registerEntryType('rainbow', { browserNotSupportedView: BrowserNotSupportedView }); -``` +``` ### REST Controllers @@ -287,10 +287,10 @@ module Rainbow describe '#create' do it 'succeeds' do - entry = create(:entry) + entry = create(:entry, entry_type: 'rainbow') authorize_for_editor_controller(entry) - post(:create, params: {entry_id: entry.id}, format: 'json') + post(:create, params: {entry_type: 'rainbow', entry_id: entry.id}, format: 'json') expect(response.status).to eq(204) end diff --git a/entry_types/paged/spec/controllers/pageflow_paged/editor/entries_controller_spec.rb b/entry_types/paged/spec/controllers/pageflow_paged/editor/entries_controller_spec.rb index f5d9aa8f4b..e7c5ebadfd 100644 --- a/entry_types/paged/spec/controllers/pageflow_paged/editor/entries_controller_spec.rb +++ b/entry_types/paged/spec/controllers/pageflow_paged/editor/entries_controller_spec.rb @@ -22,7 +22,7 @@ def main_app entry = create(:entry) authorize_for_editor_controller(entry) - get(:partials, params: {entry_id: entry}) + get(:partials, params: {entry_type: 'paged', entry_id: entry}) expect(response.status).to eq(200) end @@ -30,7 +30,7 @@ def main_app it 'requires authentication' do entry = create(:entry) - get(:partials, params: {entry_id: entry}) + get(:partials, params: {entry_type: 'paged', entry_id: entry}) expect(response).to redirect_to(main_app.new_user_session_path) end @@ -55,7 +55,7 @@ def main_app create(:widget, subject: entry.draft, role: 'footer', type_name: 'non_editor_widget') authorize_for_editor_controller(entry) - get(:partials, params: {entry_id: entry}) + get(:partials, params: {entry_type: 'paged', entry_id: entry}) expect(response.body).to have_selector('div.test_widget') expect(response.body).not_to have_selector('div.non_editor_widget') @@ -76,7 +76,7 @@ def main_app entry.draft.update(locale: 'de') authorize_for_editor_controller(entry) - get(:partials, params: {entry_id: entry}) + get(:partials, params: {entry_type: 'paged', entry_id: entry}) expect(response.body).to have_selector('div[lang=de]') end diff --git a/entry_types/paged/spec/controllers/pageflow_paged/entries_controller_spec.rb b/entry_types/paged/spec/controllers/pageflow_paged/entries_controller_spec.rb index 912abe242f..8c9caf28ac 100644 --- a/entry_types/paged/spec/controllers/pageflow_paged/entries_controller_spec.rb +++ b/entry_types/paged/spec/controllers/pageflow_paged/entries_controller_spec.rb @@ -84,7 +84,7 @@ module PageflowPaged pageflow_configure do |config| config.for_entry_type(PageflowPaged.entry_type) do |c| c.page_types.register(Pageflow::TestPageType.new(name: 'test', - template_path: 'test/page.html.erb')) + template_path: 'test/page')) end end