# Building a Web app with FP - Part III - Test Test Test ✅

**URL:** <https://discourse.haskell.org/t/building-a-web-app-with-fp-part-iii-test-test-test/2052>\
**Category:** Uncategorized\
**Created:** [March 9, 2021, 4:33pm UTC](https://discourse.haskell.org/t/building-a-web-app-with-fp-part-iii-test-test-test/2052 "2021-03-09T16:33:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matsumonkie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/matsumonkie/32/922_2.png) [@matsumonkie](https://discourse.haskell.org/u/matsumonkie)\
**Post date:** [March 9, 2021, 4:33pm UTC](https://discourse.haskell.org/t/building-a-web-app-with-fp-part-iii-test-test-test/2052/1 "2021-03-09T16:33:41Z")

</div>

Part 3 of writing a web app with FP is up [https://matsumonkie.fr/post/3](https://matsumonkie.fr/post/3)  
It’s about testing with servant, hspec, and ghcid.

---

<div class="post-metadata">

**Author:** ![gilmi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/gilmi/32/45_2.png) [@gilmi](https://discourse.haskell.org/u/gilmi)\
**Post date:** [March 9, 2021, 7:05pm UTC](https://discourse.haskell.org/t/building-a-web-app-with-fp-part-iii-test-test-test/2052/2 "2021-03-09T19:05:46Z")

</div>

Thank you, it was very interesting 🙂 It took me a minute to figure out that the `:<|>` syntax is this snippet is not like defining an operator but rather had a similar function to `(,)`

```haskell
getWeatherHandler :<|> setWeatherHandler =
  Servant.client (Proxy :: Proxy WeatherApi)

```

One thing is not entirely clear to me - you seem to use the same database for both development and testing, Is that right? Shouldn’t they be separated?

btw it’s worth mentioning that module names has to end with Spec for hspec to discover them. I lost 20 minutes or so figuring it out recently 😅

---

<div class="post-metadata">

**Author:** ![matsumonkie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/matsumonkie/32/922_2.png) [@matsumonkie](https://discourse.haskell.org/u/matsumonkie)\
**Post date:** [March 10, 2021, 7:20am UTC](https://discourse.haskell.org/t/building-a-web-app-with-fp-part-iii-test-test-test/2052/3 "2021-03-10T07:20:33Z")

</div>

> [@gilmi](#):
>
> Thank you, it was very interesting 🙂 It took me a minute to figure out that the :\<|\> syntax is this snippet is not like defining an operator but rather had a similar function to (,)  
> …  
> btw it’s worth mentioning that module names has to end with Spec for hspec to discover them. I lost 20 minutes or so figuring it out recently

Good points, I edited the article to explain them, thanks @gilmi!

> [@gilmi](#):
>
> One thing is not entirely clear to me - you seem to use the same database for both development and testing, Is that right? Shouldn’t they be separated?

That is correct, I plan to split the development/test database in the next article 🙂
