Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

135-テスト記述 #148

Closed
wants to merge 1 commit into from
Closed

Conversation

Kousuke-N
Copy link
Collaborator

@Kousuke-N Kousuke-N commented Jan 25, 2018

close #135
とりあえず書いてみました
よくわからなかったのでpostにnullの値しか与えないバージョンを作ってみました。
このとき正しくできているのかどうか判断するにはどうしたらいいですか?

@Kousuke-N Kousuke-N changed the title [update] テスト記述 135-テスト記述 Jan 25, 2018
@Kousuke-N Kousuke-N self-assigned this Jan 25, 2018
stubFor(WireMock.post(urlPathEqualTo("/login"))
.withHeader("Content-Type", matching("application/json"))
.willReturn(aResponse()));
SignIn signIn = new SignIn();
signIn.post("", "");
Copy link
Member

Choose a reason for hiding this comment

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

post_nullとかにしないでpostのままで,そのレスポンスがあってるかどうか?をverifyするとよい.

[参考]
http://wiremock.org/docs/verifying/

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

Successfully merging this pull request may close these issues.

SignIn/SignUp まわりのテストを書く.
3 participants