# Discourse plugin tests are failing

**URL:** https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199
**Category:** Development
**Created:** [March 10, 2019, 8:57am UTC](https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199 "2019-03-10T08:57:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)
#### Post date: [March 10, 2019, 8:57am UTC](https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199/1 "2019-03-10T08:57:09Z")

</div>

I am trying to run tests for a single plugin using  
`bundle exec rake plugin:spec["discourse-details"]`  
But its failing with the error

```plaintext
An error occurred while loading ./plugins/discourse-presence/spec/presence_manager_spec.rb.
Failure/Error: UserOption.create(user_id: id)

NoMethodError:
  undefined method `text_size_key' for #<UserOption:0x00007f84ddd6da80>
  Did you mean? text_size
                 text_size=
# ./app/models/user.rb:1222:in `create_user_option'
# (eval):17:in `block (2 levels) in run_file'
# ./spec/rails_helper.rb:65:in `<top (required)>'
# ./plugins/discourse-presence/spec/presence_manager_spec.rb:1:in `require'
# ./plugins/discourse-presence/spec/presence_manager_spec.rb:1:in `<top (required)>'

```

This persists for every plugin I tried. My local discourse instance is in the latest version

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 10, 2019, 9:09am UTC](https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199/2 "2019-03-10T09:09:49Z")

</div>

Did you try to rails migrate you test database?

---

<div class="post-metadata">

### Author: ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)
#### Post date: [March 10, 2019, 9:12am UTC](https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199/3 "2019-03-10T09:12:44Z")

</div>

Oh I didn’t and it fixed the issue. thank you @j.jaffeux

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 10, 2019, 9:50am UTC](https://meta.discourse.org/t/discourse-plugin-tests-are-failing/111199/4 "2019-03-10T09:50:32Z")

</div>


