Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

3 add tests to partner request spec #12

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Randond
Copy link

@Randond Randond commented Feb 27, 2019

All tests pass. Do I need to also test the conditions if the conditions are not met?

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes ("bundle exec rspec")
  • Title include "WIP" if work is in progress.

-->

Resolves #7

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

How Has This Been Tested?

Screenshots

Randond added 2 commits February 28, 2019 16:45
Copy link
Collaborator

@mdworken mdworken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really close to being done I think! The main piece remaining is then attempting to modify the partner object to violate the assumptions and verify it's no longer valid. For example, for the third test, you may want to remove the documents and verify that valid? then returns false.

@Randond
Copy link
Author

Randond commented Mar 11, 2019

@mdworken are you saying I should change to code in the partner request model (see screenshot)l? Or should I simply test to see if the tests fail without editing the model?
Screenshot (12)

end
end

describe "a partner must contain" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe blocks can contain multiple it blocks, so you don't need a second one here.

@Randond Randond requested review from mdworken and nihonjinrxs March 12, 2019 16:40
@mdworken
Copy link
Collaborator

@Randond what I'm trying to get at is within the test you should change the attribute, then verify that .save fails. Happy to pair with you on this if it'd help :)

@nihonjinrxs
Copy link
Member

@Randond you'll need to re-merge master into this branch, as it's out of date now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants