aboutsummaryrefslogtreecommitdiffstats
path: root/spec/abletonlink_spec.lua
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-12-13 13:09:23 +0000
committers-ol <s+removethis@s-ol.nu>2022-12-13 15:38:48 +0000
commita520c5c2b3274834b7eb5b0f4731d48f2c9312f7 (patch)
tree2f8995c1ed1f88b435fc508b283c28340f255eb6 /spec/abletonlink_spec.lua
parentimplement simple get/setters (diff)
downloadlua-abletonlink-a520c5c2b3274834b7eb5b0f4731d48f2c9312f7.tar.gz
lua-abletonlink-a520c5c2b3274834b7eb5b0f4731d48f2c9312f7.zip
implement session_state
Diffstat (limited to 'spec/abletonlink_spec.lua')
-rw-r--r--spec/abletonlink_spec.lua22
1 files changed, 18 insertions, 4 deletions
diff --git a/spec/abletonlink_spec.lua b/spec/abletonlink_spec.lua
index a2e4398..b0d62c1 100644
--- a/spec/abletonlink_spec.lua
+++ b/spec/abletonlink_spec.lua
@@ -19,10 +19,7 @@ describe("abletonlink library", function()
it("can create and destroy link objects", function()
local l = link.create(120)
l:destroy()
-
- assert.has.error(function()
- l:is_enabled()
- end)
+ assert.has.error(function() l:is_enabled() end)
end)
it("can be enabled and disabled", function()
@@ -78,4 +75,21 @@ describe("abletonlink library", function()
last = next
end
end)
+
+ describe("app state", function()
+ it("can be created and destroyed", function()
+ local s = link.create_session_state()
+ s:tempo()
+ s:destroy()
+ assert.has.error(function() s:tempo() end)
+ end)
+
+ it("can get/set tempo", function()
+ local s = link.create_session_state()
+ s:set_tempo(120, 0)
+ assert.is.equal(120, s:tempo())
+ s:set_tempo(90, 0)
+ assert.is.equal(90, s:tempo())
+ end)
+ end)
end)