This commit is contained in:
Adrian Kashivskyy
2022-06-22 15:33:54 +02:00
parent 188881c8fc
commit 94b35fc3df

View File

@@ -537,6 +537,49 @@ describe('addToProject', () => {
projectNumber: 1
})
})
test('compares labels case-insensitively', async () => {
mockGetInput({
'project-url': 'https://github.com/orgs/github/projects/1',
'github-token': 'gh_token',
labeled: 'FOO, Bar, baz',
'label-operator': 'AND'
})
github.context.payload = {
issue: {
number: 1,
labels: [{ name: 'foo' }, { name: 'BAR' }, { name: 'baz' }]
}
}
mockGraphQL(
{
test: /getProject/,
return: {
organization: {
projectNext: {
id: 'project-next-id'
}
}
}
},
{
test: /addProjectNextItem/,
return: {
addProjectNextItem: {
projectNextItem: {
id: 'project-next-item-id'
}
}
}
}
)
await addToProject()
expect(outputs.itemId).toEqual('project-next-item-id')
})
})
describe('mustGetOwnerTypeQuery', () => {