Exemple #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");
 }
Exemple #2
0
 @Test
 public void storeIsUpdated() {
   Store newStore = new Store("Foot Traffic");
   newStore.save();
   String storePath = String.format("http://localhost:4567/stores/%d/update", newStore.getId());
   goTo(storePath);
   fill("#name").with("Road Runner Sports");
   submit("#update_name");
   assertThat(pageSource()).contains("Road Runner Sports");
 }