# Importação de modelo ou componente de um plugin em um plugin customizado: falha nos testes

**URL:** <https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005>\
**Category:** Development\
**Tags:** testing\
**Created:** [17 Setembro , 2025 16:55 UTC](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005 "2025-09-17T16:55:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![manut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manut/32/485119_2.png) [@manut](https://meta.discourse.org/u/manut)\
**Post date:** [19 Setembro , 2025 10:05 UTC](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005/2 "2025-09-19T10:05:50Z")

</div>

Olá @Marine

Parece que o problema está nas configurações incorretas usadas no bloco `needs.settings` do nosso código:

```js
acceptance("Alguns testes", function (needs) {
  needs.settings({
    // Isso não habilitará as configurações corretas, então o plugin de calendário não será carregado e os arquivos que precisamos não estarão disponíveis
    // discourse_post_event_enabled: true, 
    // 
    // Habilitar o calendário resolverá o problema:
    calendar_enabled: true

    our_plugin_enabled: true
  });

  test("O teste", async function (assert) {
    await visit("/");
    assert.equal(1, 1);
  });
});

```

---

_[View the full topic](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005)._
