Ensure only one client is managed for given window

This commit is contained in:
Thibault Jouan
2015-04-19 05:11:01 +00:00
parent 036ca1f989
commit bdbeca399a
7 changed files with 40 additions and 3 deletions

View File

@@ -116,6 +116,11 @@ module Uh
.and have_attributes(window: window)
end
it 'registers new client only once for a given window' do
manager.manage window
expect { manager.manage window }.not_to change { manager.clients }
end
it 'ignores event when window has override redirect' do
allow(window).to receive(:override_redirect?) { true }
expect { manager.manage window }.not_to change { manager.clients }