Add docker build to main. (#16)
All checks were successful
Check / Backend (push) Successful in 20m43s
Check / Frontend (push) Successful in 1m54s
Docker Build / Build and Push Backend Image (push) Successful in 12m14s
Docker Build / Build and Push Frontend Image (push) Successful in 5m19s

Reviewed-on: #16
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-10-19 03:27:10 +00:00 committed by Drew
parent ff6837a751
commit 25eb4af14d
10 changed files with 205 additions and 24 deletions

View file

@ -52,9 +52,12 @@ describe('API Client', () => {
const result = await apiClient.listTasks()
expect(mockFetch).toHaveBeenCalledWith('/api/tasks', {
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
'http://localhost:3000/api/tasks',
{
headers: { 'Content-Type': 'application/json' },
}
)
expect(result).toEqual(mockTasks)
})
@ -94,9 +97,12 @@ describe('API Client', () => {
const result = await apiClient.getTask(mockTask.id)
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
headers: { 'Content-Type': 'application/json' },
}
)
expect(result).toEqual(mockTask)
})
@ -130,11 +136,14 @@ describe('API Client', () => {
const result = await apiClient.createTask(newTaskData)
expect(mockFetch).toHaveBeenCalledWith('/api/tasks', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(newTaskData),
})
expect(mockFetch).toHaveBeenCalledWith(
'http://localhost:3000/api/tasks',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(newTaskData),
}
)
expect(result).toEqual(mockTask)
})
@ -174,11 +183,14 @@ describe('API Client', () => {
const result = await apiClient.updateTask(mockTask.id, updateData)
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updateData),
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updateData),
}
)
expect(result).toEqual(updatedTask)
})
@ -211,10 +223,13 @@ describe('API Client', () => {
const result = await apiClient.deleteTask(mockTask.id)
expect(result).toBeNull()
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
}
)
})
it('should handle delete errors', async () => {