diff --git a/spec/lib/mconf/statistics_module_spec.rb b/spec/lib/mconf/statistics_module_spec.rb index 1a5585db0..d2047c85b 100644 --- a/spec/lib/mconf/statistics_module_spec.rb +++ b/spec/lib/mconf/statistics_module_spec.rb @@ -18,7 +18,7 @@ subject { Mconf::StatisticsModule } describe "total_users" do - let(:data) { {:all=>1, :approved=>1, :not_approved=>0, :disabled=>0} } + let(:data) { {:all=>2, :approved=>2, :not_approved=>0, :disabled=>0} } let(:nil_data) { {:all=>0, :approved=>0, :not_approved=>0, :disabled=>0} } it "function with arguments returns 'user' and with nil returns 0" do @@ -58,7 +58,7 @@ end describe "generate" do - let(:data) { {:users=>{:all=>1, :approved=>1, :not_approved=>0, :disabled=>0}, :spaces=>{:all=>1, :private=>1, :public=>0, :disabled=>0}, :meetings=>{:all=>1, :average=>0, :total=>0}, :recordings=>{:all=>1, :size=>0, :average=>5, :total=>5}}} + let(:data) { {:users=>{:all=>2, :approved=>2, :not_approved=>0, :disabled=>0}, :spaces=>{:all=>1, :private=>1, :public=>0, :disabled=>0}, :meetings=>{:all=>1, :average=>0, :total=>0}, :recordings=>{:all=>1, :size=>0, :average=>5, :total=>5}}} let(:nil_data) { {:users=>{:all=>0, :approved=>0, :not_approved=>0, :disabled=>0}, :spaces=>{:all=>0, :private=>0, :public=>0, :disabled=>0}, :meetings=>{:all=>0, :average=>0, :total=>0}, :recordings=>{:all=>0, :size=>0, :average=>0, :total=>0}} } it "function with arguments returns 'user, space, meeting and recording' (all data) and with nil returns nothing" do @@ -68,7 +68,7 @@ end describe "generate_csv" do - let(:data) {"users.all,users.approved,users.not_approved,users.disabled,spaces.all,spaces.private,spaces.public,spaces.disabled,meetings.all,meetings.average,meetings.total,recordings.all,recordings.size,recordings.average,recordings.total\n1,1,0,0,1,1,0,0,1,0,0,1,0,5,5\n"} + let(:data) {"users.all,users.approved,users.not_approved,users.disabled,spaces.all,spaces.private,spaces.public,spaces.disabled,meetings.all,meetings.average,meetings.total,recordings.all,recordings.size,recordings.average,recordings.total\n2,2,0,0,1,1,0,0,1,0,0,1,0,5,5\n"} it "function with arguments returns file .csv and with nil returns nil" do subject.generate_csv(start_date, end_date).should eql(data)