Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed May 8, 2017
1 parent 350a829 commit 4d0b1a6
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"en"
],
"serverPort": 8080,
"jhipsterVersion": "4.4.0",
"jhipsterVersion": "4.4.1",
"enableSocialSignIn": false,
"jwtSecretKey": "042e7d536354d3cdfab490925c55022efcb42bae",
"useSass": false,
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# jhipsterJwtSampleApplication
This application was generated using JHipster 4.4.0, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.4.0](https://jhipster.github.io/documentation-archive/v4.4.0).
This application was generated using JHipster 4.4.1, you can find documentation and help at [https://jhipster.github.io/documentation-archive/v4.4.1](https://jhipster.github.io/documentation-archive/v4.4.1).

## Development

Expand Down Expand Up @@ -96,13 +96,13 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
To configure CI for your project, run the ci-cd sub-generator (`yo jhipster:ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.

[JHipster Homepage and latest documentation]: https://jhipster.github.io
[JHipster 4.4.0 archive]: https://jhipster.github.io/documentation-archive/v4.4.0
[JHipster 4.4.1 archive]: https://jhipster.github.io/documentation-archive/v4.4.1

[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.4.0/development/
[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.4.0/docker-compose
[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.4.0/production/
[Running tests page]: https://jhipster.github.io/documentation-archive/v4.4.0/running-tests/
[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.4.0/setting-up-ci/
[Using JHipster in development]: https://jhipster.github.io/documentation-archive/v4.4.1/development/
[Using Docker and Docker-Compose]: https://jhipster.github.io/documentation-archive/v4.4.1/docker-compose
[Using JHipster in production]: https://jhipster.github.io/documentation-archive/v4.4.1/production/
[Running tests page]: https://jhipster.github.io/documentation-archive/v4.4.1/running-tests/
[Setting up Continuous Integration]: https://jhipster.github.io/documentation-archive/v4.4.1/setting-up-ci/

[Gatling]: http://gatling.io/
[Node.js]: https://nodejs.org/
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated on 2017-05-08 using generator-jhipster 4.4.0
// Generated on 2017-05-08 using generator-jhipster 4.4.1
'use strict';

var gulp = require('gulp'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"eslint-config-angular": "0.5.0",
"eslint-plugin-angular": "2.2.1",
"event-stream": "3.3.4",
"generator-jhipster": "4.4.0",
"generator-jhipster": "4.4.1",
"gulp": "3.9.1",
"gulp-angular-filesort": "1.1.1",
"gulp-angular-templatecache": "2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ public boolean equals(Object o) {

Authority authority = (Authority) o;

if (name != null ? !name.equals(authority.name) : authority.name != null) {
return false;
}

return true;
return !(name != null ? !name.equals(authority.name) : authority.name != null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,50 @@ public void testSaveExistingEmail() throws Exception {
assertThat(updatedUser.getEmail()).isEqualTo("[email protected]");
}

@Test
@Transactional
@WithMockUser("save-existing-email-and-login")
public void testSaveExistingEmailAndLogin() throws Exception {
User user = new User();
user.setLogin("save-existing-email-and-login");
user.setEmail("[email protected]");
user.setPassword(RandomStringUtils.random(60));
user.setActivated(true);

userRepository.saveAndFlush(user);

User anotherUser = new User();
anotherUser.setLogin("save-existing-email-and-login");
anotherUser.setEmail("[email protected]");
anotherUser.setPassword(RandomStringUtils.random(60));
anotherUser.setActivated(true);

UserDTO userDTO = new UserDTO(
null, // id
"not-used", // login
"firstname", // firstName
"lastname", // lastName
"[email protected]", // email
false, // activated
"http://placehold.it/50x50", //imageUrl
"en", // langKey
null, // createdBy
null, // createdDate
null, // lastModifiedBy
null, // lastModifiedDate
new HashSet<>(Collections.singletonList(AuthoritiesConstants.ADMIN))
);

restMvc.perform(
post("/api/account")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(userDTO)))
.andExpect(status().isOk());

User updatedUser = userRepository.findOneByLogin("save-existing-email-and-login").orElse(null);
assertThat(updatedUser.getEmail()).isEqualTo("[email protected]");
}

@Test
@Transactional
@WithMockUser("change-password")
Expand Down Expand Up @@ -589,6 +633,23 @@ public void testChangePasswordTooLong() throws Exception {
assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword());
}

@Test
@Transactional
@WithMockUser("change-password-empty")
public void testChangePasswordEmpty() throws Exception {
User user = new User();
user.setPassword(RandomStringUtils.random(60));
user.setLogin("change-password-empty");
user.setEmail("[email protected]");
userRepository.saveAndFlush(user);

restMvc.perform(post("/api/account/change_password").content(RandomStringUtils.random(0)))
.andExpect(status().isBadRequest());

User updatedUser = userRepository.findOneByLogin("change-password-empty").orElse(null);
assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword());
}

@Test
@Transactional
public void testRequestPasswordReset() throws Exception {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2297,9 +2297,9 @@ generate-object-property@^1.1.0:
dependencies:
is-property "^1.0.0"

[email protected].0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/generator-jhipster/-/generator-jhipster-4.4.0.tgz#ef23ecf9ea53a4e80064f1db2baf904bd717062f"
[email protected].1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/generator-jhipster/-/generator-jhipster-4.4.1.tgz#8915817c2023997af85c55edcb6f6719f41f5c1c"
dependencies:
chalk "1.1.3"
cheerio "0.22.0"
Expand Down

0 comments on commit 4d0b1a6

Please sign in to comment.