Example #1
0
 @Test
 public void brandIsAddedToStore() {
   Brand newBrand = new Brand("Asics");
   newBrand.save();
   Store newStore = new Store("Foot Traffic");
   newStore.save();
   newStore.addBrand(newBrand.getId());
   goTo("http://localhost:4567/stores/" + newStore.getId());
   assertThat(pageSource()).contains("Asics");
 }
Example #2
0
 @Test
 public void brandsAndStoresDisplayedCorrectly() {
   Brand newBrand = new Brand("Nike");
   newBrand.save();
   Store newStore = new Store("Foot Traffic");
   newStore.save();
   goTo("http://localhost:4567/");
   assertThat(pageSource()).contains("Nike");
   assertThat(pageSource()).contains("Foot Traffic");
 }