rmega 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rmega/version.rb +1 -1
- data/spec/integration/folder_operations_spec.rb +21 -19
- metadata +1 -1
data/lib/rmega/version.rb
CHANGED
@@ -1,28 +1,30 @@
|
|
1
1
|
require 'integration_spec_helper'
|
2
2
|
|
3
3
|
describe 'Folders operations' do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
if account_file_exists?
|
5
|
+
before :all do
|
6
|
+
@session = storage.session
|
7
|
+
@parent_node = @session.storage.root_node
|
8
|
+
@folder_name = "test_folder_#{rand.denominator}_#{rand.denominator}"
|
9
|
+
@folder_node = @session.storage.create_folder @parent_node, @folder_name
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
it 'creates a new folder' do
|
13
|
+
@folder_node.should be_kind_of Rmega::Node
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
it 'finds the folder' do
|
17
|
+
node = @session.storage.nodes.find { |n| n.name == @folder_name }
|
18
|
+
node.should_not be_nil
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
it 'deletes the folder' do
|
22
|
+
lambda { @folder_node.delete }.should_not raise_error
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
it 'does not find the folder anymore' do
|
26
|
+
node = @session.storage.nodes.find { |n| n.name == @folder_name }
|
27
|
+
node.should be_nil
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|