aboutsummaryrefslogtreecommitdiffstats
path: root/spec/active_relation/primitives/attribute_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/active_relation/primitives/attribute_spec.rb')
-rw-r--r--spec/active_relation/primitives/attribute_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/active_relation/primitives/attribute_spec.rb b/spec/active_relation/primitives/attribute_spec.rb
index 2aad844659..f1aa404a34 100644
--- a/spec/active_relation/primitives/attribute_spec.rb
+++ b/spec/active_relation/primitives/attribute_spec.rb
@@ -16,6 +16,10 @@ describe ActiveRelation::Primitives::Attribute do
it "manufactures an attribute name prefixed with the relation's name" do
@relation1[:id].qualified_name.should == 'foo.id'
end
+
+ it "manufactures an attribute name prefixed with the relation's aliased name" do
+ @relation1.as(:bar)[:id].qualified_name.should == 'bar.id'
+ end
end
describe '#qualify' do