Commit 4356cf56 authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade test para comprobar get de selectionWork

parent 4107b788
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ public class SettingsControllerBase extends DocumentationViewBaseTest {
	}

	@Test
	public void getCategory_Return200_WhenItemExist() throws Exception {
	public void getSettings_Return200_WhenItemExist() throws Exception {

		// @formatter:off
		
@@ -133,6 +133,22 @@ public class SettingsControllerBase extends DocumentationViewBaseTest {
		// @formatter:on
	}

	@Test
	public void getSettingsWork_Return200_WhenItemExist() throws Exception {

		// @formatter:off
		
		this.mockMvc.perform(get(SETTINGS_PATH + "/" + settingsWork.getId())
				.header("Authorization", "Bearer " + getTokenOAGUser())
				.accept(MediaType.APPLICATION_JSON))
			.andExpect(status().isOk())
			.andExpect(jsonPath("$.success", is(true)))
			.andExpect(jsonPath("$.body", notNullValue()))
			.andExpect(jsonPath("$.body.id", is(settingsWork.getId())));
		
		// @formatter:on
	}

	@Test
	public void searchSettingsPost_Return200_WhenSearchIsCorrect() throws Exception {