Skip to content

Commit

Permalink
Add BuildResultForArchitectureComponentPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
saraycp committed Nov 21, 2022
1 parent 830d9d5 commit e9c816c
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class BuildResultForArchitectureComponentPreview < ViewComponent::Preview
# Preview at http://HOST:PORT/rails/view_components/build_result_for_architecture_component/succeeded
def succeeded
result = LocalBuildResult.new(
repository: '15.4',
architecture: 'x86_64',
code: 'succeeded',
state: 'blocked',
is_repository_in_db: 'true'
)
render(BuildResultForArchitectureComponent.new(result, 'fake_project', 'fake_package'))
end

# Preview at http://HOST:PORT/rails/view_components/build_result_for_architecture_component/broken
def broken
result = LocalBuildResult.new(
repository: '15.4',
architecture: 'x86_64',
code: 'broken',
state: 'published',
is_repository_in_db: 'true',
details: 'fake details'
)
render(BuildResultForArchitectureComponent.new(result, 'fake_project', 'fake_package'))
end
end

0 comments on commit e9c816c

Please sign in to comment.