Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix active_model require in webchat test #1786

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Conversation

sihugh
Copy link
Contributor

@sihugh sihugh commented Jun 2, 2020

Before:

bundle exec rails test test/models/webchat_test.rb:20
Started with run options --seed 46747

WebchatTest
  test_should_return_error_if_config_is_invalid                  ERROR (0.00s)
Minitest::UnexpectedError:         NameError: uninitialized constant ActiveModel::ValidationError
            test/models/webchat_test.rb:25:in `block in <class:WebchatTest>'

Finished in 0.00445s
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

After:

bundle exec rails test test/models/webchat_test.rb:20
Started with run options --seed 32937

WebchatTest
  test_should_return_error_if_config_is_invalid                   PASS (1.28s)

Finished in 1.28149s
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

The previous fix didn't seem to always work: https://ci.integration.publishing.service.gov.uk/job/government-frontend/job/master/1458/console

Before:

```
bundle exec rails test test/models/webchat_test.rb:20
Started with run options --seed 46747

WebchatTest
  test_should_return_error_if_config_is_invalid                  ERROR (0.00s)
Minitest::UnexpectedError:         NameError: uninitialized constant ActiveModel::ValidationError
            test/models/webchat_test.rb:25:in `block in <class:WebchatTest>'

Finished in 0.00445s
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
```

After:

```
bundle exec rails test test/models/webchat_test.rb:20
Started with run options --seed 32937

WebchatTest
  test_should_return_error_if_config_is_invalid                   PASS (1.28s)

Finished in 1.28149s
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
```
@bevanloon bevanloon temporarily deployed to government-f-validation-k9m9rc June 2, 2020 12:47 Inactive
@sihugh sihugh merged commit 7214917 into master Jun 4, 2020
@sihugh sihugh deleted the validations-require branch June 4, 2020 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants