title: When testing a specific condition / scenario, is it necessary to check both the before and after results?
body: <p>I'm unit testing code that deals with the delegation of time-sensitive tasks to casual workers with variable hours of availability. The general answer I'm after, however, should be independent of this context.</p>
  <p>So, I'll have tests which follow this structure:</p>
  <h3>Test Task 1 is delegated to Bob under Specific Condition X:</h3>
  <ol>
  <li>Check <strong>Task 1</strong> gets delegated to <strong>Frank</strong></li>
  <li>Create specific condition X</li>
  <li>Test <strong>Task 1</strong> gets delegated to <strong>Bob</strong> now, instead.</li>
  </ol>
  <p>My question is, is step 1 superfluous? I already have another tests that checks step 1 alone (that under no specific conditions, the task gets delegated to Frank).</p>
  <p>However, adding step 1 made me feel secure that my test is in fact testing the exact right thing - I verify that the result changes under condition X.</p>
  <p>Here's another more specific example:</p>
  <h3>Test Tasks aren't delegated if no one is available</h3>
  <ol>
  <li>Create availabilities, and check tasks are delegated</li>
  <li>Remove availabilities, and check tasks are NOT delegated</li>
  </ol>
  <p>Again, is step 1 overkill? I already have a test to test for step 1, on it's own:</p>
  <h3>Test Tasks ARE delegated if people ARE available</h3>
  <ol>
  <li>Create availabilities, and check tasks are delegated</li>
  </ol>
  <p>So, is it stupid to re-test that scenario in the previous example, just be make extra certain?</p>
  <p>I initially (some time ago) thought it was a good idea, but reading my code now, it seems like overkill. But I want to be certain before deleting a whole bunch of code from my test suite!</p>
  <p>Thanks!</p>