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

api.specHelper.findEnqueuedTasks #1331

Merged
merged 2 commits into from Sep 3, 2019
Merged

api.specHelper.findEnqueuedTasks #1331

merged 2 commits into from Sep 3, 2019

Conversation

evantahler
Copy link
Member

@evantahler evantahler commented Sep 3, 2019

  • Adds api.specHelper.findEnqueuedTasks to write tests that check that task was enqueued!
describe('task testing', () => {
  beforeEach(async () => {
    await api.resque.queue.connection.redis.flushdb()
  })

  test('detect that a task was enqueued to run now', async () => {
    await api.tasks.enqueue('regularTask', { word: 'testing' })
    const found = await api.specHelper.findEnqueuedTasks('regularTask')
    expect(found.length).toEqual(1)
    expect(found[0].args[0].word).toEqual('testing')
    expect(found[0].timestamp).toBeNull()
  })
})

@evantahler evantahler mentioned this pull request Sep 3, 2019
3 tasks
@evantahler
Copy link
Member Author

@piyushagwl007 here's an example of a good Pull Request

@evantahler evantahler merged commit 9dae93f into master Sep 3, 2019
@evantahler evantahler deleted the test-task-enqueue branch September 3, 2019 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants