Skip to content

Commit

Permalink
new test cases that should be valid
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Oct 24, 2023
1 parent 257c227 commit f828108
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ context('Home Page', () => {

cy.get('.profile [name="loginShell"]').should('exist').should('not.have.attr', 'disabled')

cy.get('.profile [name="orcid"]').should('exist').type('1234-1234-1234-1234')
cy.get('.profile [name="orcid"]').should('exist').type('1234-1234-1234-123X')
cy.get('.profile button').click()

cy.wait('@api-user-profile-put').should(({ request, response }) => {
Expand All @@ -80,7 +80,7 @@ context('Home Page', () => {
'author_firstName': '',
'author_lastName': '',
'author_email': '',
'orcid': '1234-1234-1234-1234',
'orcid': '1234-1234-1234-123X',
'phd_year': '',
'github': '',
'slack': '',
Expand Down
6 changes: 5 additions & 1 deletion tests/test_api_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ async def test_user_put(server):

await client.request('PUT', '/api/users/test', {'orcid': '0000-0001-8945-6722'})
ret = await krs.users.user_info('test', rest_client=krs_client)
assert ret['attributes']['orcid'] == '0000-0001-8945-6722'
assert ret['attributes']['orcid'] == '0000-0001-8945-6722'

await client.request('PUT', '/api/users/test', {'orcid': '0001-0002-0003-000X'})
ret = await krs.users.user_info('test', rest_client=krs_client)
assert ret['attributes']['orcid'] == '0001-0002-0003-000X'

with pytest.raises(Exception):
await client.request('PUT', '/api/users/test', {'orcid': '1-2-3-4'})
Expand Down

0 comments on commit f828108

Please sign in to comment.