require'spec_helper'describeCi::GroupVariable,models: truedosubject{build(:ci_group_variable)}it{is_expected.toinclude_module(HasVariable)}it{is_expected.toinclude_module(Presentable)}it{is_expected.tovalidate_uniqueness_of(:key).scoped_to(:group_id)}describe'.unprotected'dosubject{described_class.unprotected}context'when variable is protected'dobeforedocreate(:ci_group_variable,:protected)endit'returns nothing'dois_expected.tobe_emptyendendcontext'when variable is not protected'dolet(:variable){create(:ci_group_variable,protected: false)}it'returns the variable'dois_expected.tocontain_exactly(variable)endendendend