feat: rename
This commit is contained in:
parent
47a5c7a5e5
commit
53ab1cc000
21 changed files with 191 additions and 191 deletions
|
|
@ -1,7 +1,7 @@
|
|||
require('spec.helpers')
|
||||
|
||||
local config = require('todo.config')
|
||||
local store = require('todo.store')
|
||||
local config = require('pending.config')
|
||||
local store = require('pending.store')
|
||||
|
||||
describe('store', function()
|
||||
local tmpdir
|
||||
|
|
@ -9,14 +9,14 @@ describe('store', function()
|
|||
before_each(function()
|
||||
tmpdir = vim.fn.tempname()
|
||||
vim.fn.mkdir(tmpdir, 'p')
|
||||
vim.g.todo = { data_path = tmpdir .. '/tasks.json' }
|
||||
vim.g.pending = { data_path = tmpdir .. '/tasks.json' }
|
||||
config.reset()
|
||||
store.unload()
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
vim.fn.delete(tmpdir, 'rf')
|
||||
vim.g.todo = nil
|
||||
vim.g.pending = nil
|
||||
config.reset()
|
||||
end)
|
||||
|
||||
|
|
@ -37,14 +37,14 @@ describe('store', function()
|
|||
tasks = {
|
||||
{
|
||||
id = 1,
|
||||
description = 'Todo one',
|
||||
description = 'Pending one',
|
||||
status = 'pending',
|
||||
entry = '2026-01-01T00:00:00Z',
|
||||
modified = '2026-01-01T00:00:00Z',
|
||||
},
|
||||
{
|
||||
id = 2,
|
||||
description = 'Todo two',
|
||||
description = 'Pending two',
|
||||
status = 'done',
|
||||
entry = '2026-01-01T00:00:00Z',
|
||||
modified = '2026-01-01T00:00:00Z',
|
||||
|
|
@ -55,7 +55,7 @@ describe('store', function()
|
|||
local data = store.load()
|
||||
assert.are.equal(3, data.next_id)
|
||||
assert.are.equal(2, #data.tasks)
|
||||
assert.are.equal('Todo one', data.tasks[1].description)
|
||||
assert.are.equal('Pending one', data.tasks[1].description)
|
||||
assert.are.equal('done', data.tasks[2].status)
|
||||
end)
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ describe('store', function()
|
|||
tasks = {
|
||||
{
|
||||
id = 1,
|
||||
description = 'Todo',
|
||||
description = 'Pending',
|
||||
status = 'pending',
|
||||
entry = '2026-01-01T00:00:00Z',
|
||||
modified = '2026-01-01T00:00:00Z',
|
||||
|
|
@ -157,7 +157,7 @@ describe('store', function()
|
|||
tasks = {
|
||||
{
|
||||
id = 1,
|
||||
description = 'Todo',
|
||||
description = 'Pending',
|
||||
status = 'pending',
|
||||
entry = '2026-01-01T00:00:00Z',
|
||||
modified = '2026-01-01T00:00:00Z',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue